-
-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dart-sass? #435
dart-sass? #435
Comments
@jethrolarson 'dart-sass' is cool project, but there are a lot of bugs with |
Agreeing with @evilebottnawi here, |
Just went into beta , may be with looking into now |
@lukepolo seems more related to |
@graingert can you explain why |
@evilebottnawi saves waiting for the compile step on npm install Also it's the future of sass: http://sass.logdown.com/posts/1022316-announcing-dart-sass |
@evilebottnawi Importer support is a high-priority feature for Dart Sass; we consider it blocking a 1.0.0 stable release. |
For those googling around on how to use dart-sass instead of libsass/SassC in Vue, the answer is you can't. Until it has webpack/vue-loader/sass-loader support. Which can't happen without importer support, even if you are willing to simplify your sass to work with dart-sass. You can follow progress here sass/dart-sass#12 |
I just put out sass/dart-sass#186 which adds support for synchronous importers. I hope to land it tomorrow. Asynchronous importers will take more work, but this is an important step. |
Looks like @nex3 has merged async import support, can you reopen this ticket @michael-ciniawsky? |
I'm planning to release a beta release with async importer support later this week. If possible, this should pass the |
For me it would be greate if the |
Dart Sass is in Release Candidate phase now, with a full release probably coming next week. I'm happy to help write up a pull request to add support, but there are a couple of design questions that should probably be addressed by the maintainers first:
|
Should be done after #533 |
@jethrolarson @evilebottnawi |
Now that #533 has landed, what are the next steps here? |
Wow ruby-sass was deprecated? Didn't see that coming 😁 Are you planing with dart-sass to expose the same API as node-sass? What notable differences are there between dart-sass and node-sass? Regarding your suggestions: From a conceptual perspective, I prefer the former one with
We should remove that feature with a breaking change since it's deprecated anyway. Until then, I can add the same deprecation warning as in sass/libsass#2613. If dart-sass is mature enough and reliable, I'm open to switch to dart-sass as the new default. I suspect the node-sass' thread pool issue (sass/node-sass#857) to be responsible for the performance problems at sass-loader #296 since we're using the custom importer feature. |
Sure if you're running an install every time you compile your Sass code in dev. |
It ends up happening a lot, eg when building docker images using Dockerfile |
@graingert you can prepare docker image before run some stuff |
@evilebottnawi I know that, I used to maintain shipwright a tool for doing just that, but sometimes it's fiddly |
Integrating the Dart VM version into a package like this which supports the Node Sass API would be fairly difficult. When you're running a subprocess, it's much harder to define importers or custom functions, because they have such a fine-grained mode of communication. sass/dart-sass#248 discusses the possibility of defining a protocol that could be used over stdin/stdout to make this work, but at the moment we don't have anyone signed up to implement the JS side of that protocol. If you're willing to abandon importer/custom function support, it would be a lot easier to wrap the Dart executable. This is essentially how the |
We are already making a lot of painful sacrifices to use sass with node-sass. There are a LOT of benefits to switching... sharing To be fair, I get it won't be easy to make the switch, it'll inevitably have to be a breaking switch, perhaps an installation option to make it easier, similar to how less support is set up? Update: whoops, thought this was vue-cli |
Fwiw node-sass installation issues will be a thing of the past before too
long
…On Sat., 7 Jul. 2018, 11:38 am Ray Foss, ***@***.***> wrote:
But that's not a sacrifice everyone would be willing to make.
We are already making a lot of painful sacrifices to use sass with
node-sass. Sharing node_modeles with docker, faster compilation, never
break my installation after a node/system update, just to name a few...
node-sass is a pita, dart-sass can't possibly be worse.
To be fair, I get it won't be easy to make the switch, it'll inevitably
have to be a breaking switch, perhaps an installation option to make it
easier, similar to how less support is set up?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#435 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWFJTw0FMOkEskeT0JDifU2d-CsW_ks5uEBEDgaJpZM4M60Gd>
.
|
@xzyfer Can you elaborate this further? Are there plans to optimize node-sass' compilation? |
N-API and or wasm I believe
…On Sat, 7 Jul 2018, 10:25 Mato Ilic, ***@***.***> wrote:
@xzyfer <https://github.com/xzyfer> Can you elaborate this further? Are
there plans to optimize node-sass' compilation?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#435 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZQTIX4aQcLs4xbCt5JaNZ04fJoyPknks5uEH57gaJpZM4M60Gd>
.
|
I have switched to the modified version of this loader (from #573) and dart-sass for a fairly big project (10k lines of SCSS) and did not notice any significant slowdown. It could be slower, but with watch mode and incremental builds, it doesn't actually matter. On other hand, it simplifies infrastructure a lot, when you have to deal only with pure Javascript dependencies. |
Rather than always loading Node Sass, this now requires users to pass in either Dart Sass or Node Sass as an option to the loader. Closes #435
What is the status of this issue? Can we use now dart-sass in webpack? I can't see any documentation to for the webpack config |
@samayo Official NPM package |
@Simek Thanks, I do have sass and sass-loader "devDependencies": {
"sass": "^1.23.0",
"sass-loader": "^8.0.0" and I have the loaders setup correctly {
test: /\.s[ac]ss$/i,
use: [
'style-loader',
'css-loader',
{
loader: 'sass-loader',
options: {
implementation: require('sass'),
},
},
],
} The config is as suggested in https://github.com/webpack-contrib/sass-loader#implementation But I can't seem to use the sass module features as mentioned in https://sass-lang.com/documentation/at-rules/use If npm/sass is just fetching dart-sass, these options should be available, i think. |
@Simek Thanks. I still can't verify if this feature is added or not from reading the commit. It seems like the readme is updated, tests written but feature isn't there yet? I will ask on dart-sass if they can make something of it, but thanks ... at least now i'm half certain i'm not going mad :) |
We officially support dart-sass with |
Currenly experiencing the same problem: latest sass-loader doesn't fully recognize current scss syntax. Using:
|
Is there any intent to swap to using https://github.com/sass/dart-sass when it goes gold?
Supposedly it's way faster, and speed hasn't been one of sass's strong points.
The text was updated successfully, but these errors were encountered: