-
Notifications
You must be signed in to change notification settings - Fork 358
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
Help migrate Node Sass tools to be implementation-agnostic #267
Comments
Rollup has a plugin: https://github.com/differui/rollup-plugin-sass It supports sending a runtime: elycruz/rollup-plugin-sass#54 I submitted that PR specifically so I could use dart-sass rather than node-sass (node-sass takes about a billion years to compile and isn't any faster on my system). |
@TheBosZ Thanks for the link! Note though that as long as |
You're welcome! I know about the dependency problem. I'm going to try to slowly convince people to move over to dart-sass. I wish there was a way to define a peer dependency with an "OR". |
A note on compiles, you should never have to compile node-sass locally. We literally spend days doing the compilations for every release so you don't have to. Check the release notes for the installed node-sass for the tabled of supported Node versions and operating environments, and update to an appropriate version. |
@xzyfer It's great that you try to provide multiple versions, but I've often had node-gyp spin up a build step that's annoying. It also often happens that I'll update node and it'll throw a warning about needing to be recompiled rather than just doing it itself. Having a "pure javascript" way of doing sass is very desirable from a usability standpoint while node-sass is great for power users. This also gets around crap like: sass/node-sass#1944 |
@TheBosZ , when that happens, remove the |
@robsonsobral That's not any easier than doing the |
No need for the --force flag. Without it the rebuild should take seconds.
…On Wed., 4 Jul. 2018, 3:15 am Nathan, ***@***.***> wrote:
@robsonsobral <https://github.com/robsonsobral> That's not an easier than
doing the npm rebuild node-sass --force dance. Especially when
node_modules takes around 2 minutes to fully delete on Windows 7.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#267 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWCx2iDRfg5f6QqbALjuuasbDKfNWks5uC6amgaJpZM4S4BYu>
.
|
As an update, rollup-plugin-sass has switched! https://github.com/differui/rollup-plugin-sass/blob/master/CHANGELOG.md |
Support for Dart Sass has landed in create-react-app: facebook/create-react-app#7496. I'm closing this out, since all the major players now support Dart Sass. |
There are a number of Node.js tools out there today that use Node Sass, either directly or as a plugin for a broader build system. In order to make it easier for JS users to use Node Sass, we should help those tools migrate to something that supports Dart Sass as well.
Given a tool that depends on Node Sass and imports it directly, this probably means:
Removing the Node Sass dependency.
Changing the API to take the Sass implementation as a parameter. How this work may depend on the specific library involved, but one simple example would be:
This will probably be a breaking change to the package, so include a major version bump.
These seem to be the most widely-used integration packages:
sass-loader
(for Webpack) — dart-sass? webpack-contrib/sass-loader#435 (pull request: Make this package implementation-agnostic webpack-contrib/sass-loader#573)react-scripts
— Add support for Dart Sass facebook/create-react-app#5282gulp-sass
— Add support for Dart Sass dlmanning/gulp-sass#672 (pull request: Make this package implementation-agnostic dlmanning/gulp-sass#694)broccoli-sass-source-maps
— Add support for Dart Sass adopted-ember-addons/broccoli-sass-source-maps#26 (pull request: Make this package implementation-agnostic adopted-ember-addons/broccoli-sass-source-maps#28)ember-cli-sass
— Add support for Dart Sass adopted-ember-addons/ember-cli-sass#184 (pull request: Make this package implementation-agnostic adopted-ember-addons/ember-cli-sass#186)grunt-sass
— Add support for Dart Sass sindresorhus/grunt-sass#278 (pull request: Add support for Dart Sass sindresorhus/grunt-sass#283)eyeglass
— support dart-sass linkedin/eyeglass#173(If anyone has any more packages, let us know!)
The text was updated successfully, but these errors were encountered: