thgh / rollup-plugin-scss

Rollup and compile multiple .scss, .sass and .css imports
MIT License
134 stars 47 forks source link

Alias '~' on 'node_modules' not working #93

Open tlyau62 opened 2 years ago

tlyau62 commented 2 years ago

May I ask is there any way to reference ~ to node_modules?

I have tried "@rollup/plugin-alias"

alias({
      entries: {
        "~": path.join(__dirname, "node_modules/"),
      },
 })

with includePaths: ["node_modules"], but it seems not working.

The error is this.

Error:
        Can't find stylesheet to import.
  ╷
2 │ @import "~bootstrap/scss/functions";
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  stdin 2:9  root stylesheet

Thanks for the help.

lencil commented 2 years ago

try node-sass instead of sass.

phil-w commented 1 year ago

Yeah. I'm using node-sass 8.0.0 and it makes no difference to the problem.

KooWeiHao commented 1 year ago

Have you solved this issue? cc: @thgh , @phil-w

thgh commented 1 year ago

Sorry, I haven't looked into it. The options are passed to scss, so I would hope that library takes care of it.