Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants