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

Allow both node-sass and sass #80

Open
dkonchekov opened this issue Feb 21, 2020 · 1 comment
Open

Allow both node-sass and sass #80

dkonchekov opened this issue Feb 21, 2020 · 1 comment

Comments

@dkonchekov
Copy link

We have issue with vue-jest, that uses this package. (vuejs/vue-jest#137 (comment)).
It would be nice to borrow experience on sass-loader and provide a choice of what to use: node-sass or sass (https://github.com/webpack-contrib/sass-loader/blob/master/src/getDefaultSassImplementation.js)

sass-loader requires you to install either Node Sass or Dart Sass on your own (more documentation can be found below). This allows you to control the versions of all your dependencies, and to choose which Sass implementation to use.

@tim-janik
Copy link

I also ran into issues with dart sass being used. Here is a snippet it doesn't parse well and errors out (much reduced from the original case):

<style lang="scss">
  $xsize: 10;
  body {
    --xsize: #{$xsize};
    padding: max(5,7) * 1px var(--xsize);
  }
</style>

This produces:

[!] (plugin VuePlugin) Error: Error: Undefined operation "max(5, 7) * 1px".

But changing lib/styleProcessors/index.ts to load 'node-sass' again fixes the issue.

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