Skip to content
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

Move to dart-sass instead of node-sass #50

Closed
mi2oon opened this issue Jan 8, 2019 · 4 comments
Closed

Move to dart-sass instead of node-sass #50

mi2oon opened this issue Jan 8, 2019 · 4 comments

Comments

@mi2oon
Copy link
Member

mi2oon commented Jan 8, 2019

Shall we switch to dart-sass for our gulp-sass?

Although node-sass is based on libsass and will continue to be updated with the latest patch and fixes, it will take more time for features to land while dart-sass will receive them immediately and has the benefit of compiling with pure JS without the need of native modules.

Well, it's twice as slow as libsass but it's pure js meaning it doesn't spin up node-gyp and avoids a build step that's annoying and error prone at times.

What do you @kraftvaerk/frontend think?

@kristoforsalmin
Copy link

kristoforsalmin commented Apr 4, 2019

Hi @mi2oon, I'm totally up for it, it also has some nice features, such as CSS imports :-) Also, as you said, removing node-gyp is quite a relief.

@mi2oon
Copy link
Member Author

mi2oon commented Apr 5, 2019

@racse1 I think I'll remove gulp-sass and postcss-import. 🗑

First gulp-sass as it has a default dependency on node-sass. So when installing it would still fetch/install it. I've found another project postcss-sass which looks promising and I've tested it and on another project and it seems to do the job and doesn't have node-sass as it's default dependency. Furthermore it brings us closer to having the option to completely removing gulp for our style build pipleline. ☘️

Let me know if all that is alright and I'll make a PR 🎟

@kristoforsalmin
Copy link

👍

Furthermore it brings us closer to having the option to completely removing gulp for our style build pipleline. ☘️

Really looking forward to that one 😁


If we were to consider using webpack for building styles, then that works just fine:

webpack.config.js

{
    test: /\.scss$/,
    use: [
        MiniCssExtractPlugin.loader,
        'css-loader',
        {
            loader: 'postcss-loader',
            options: {
                plugins: [autoprefixer],
            },
        },
        'sass-loader',
    ],
}

package.json

{
   "devDependencies": {
      "sass": "*",
      "sass-loader": "*"
   }
}

@kristoforsalmin kristoforsalmin added this to the v4 milestone Oct 10, 2019
@kristoforsalmin
Copy link

Fixed in #55.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants