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

Dart-sass support #553

Open
markboyessmith opened this issue Jul 4, 2020 · 1 comment
Open

Dart-sass support #553

markboyessmith opened this issue Jul 4, 2020 · 1 comment

Comments

@markboyessmith
Copy link

markboyessmith commented Jul 4, 2020

This issue is a: Question / support request

Currently using nwb-sass for sass support. This gives us sass compilation via node-sass.

Looking to move over to pure sass (dart-sass) but unable to get nwb config file to pick this up successfully.

module.exports = {
  webpack: {
    rules: {
      sass: {
        loader: require.resolve('sass-loader'),
        options: {
          implementation: require.resolve('sass'),
        }
      }
    }
  }
}

Any ideas?

@ianizaguirre
Copy link

ianizaguirre commented Apr 28, 2021

@markboyessmith I figured it out.

I added this to my nwb webpack rules:

    rules: {
      sass: {
        loader: "sass-loader",
        // Prefer `dart-sass`
        implementation: require("sass"),
      },
    },

and installed these 2 packages in my package.json:

    "sass": "^1.32.11",
    "sass-loader": "^10.1.1"

For reference I have the following nwb version installed:

    "nwb": "^0.25.2",
    "nwb-sass": "^0.10.2",

and its working for me now using dart-sass.

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

No branches or pull requests

2 participants