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

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

Open
tlyau62 opened this issue Nov 19, 2021 · 4 comments
Open

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

tlyau62 opened this issue Nov 19, 2021 · 4 comments

Comments

@tlyau62
Copy link

tlyau62 commented Nov 19, 2021

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.

@tlyau62 tlyau62 changed the title Alias ~ on node_modules Alias '~' on 'node_modules' not working Nov 19, 2021
@tlyau62 tlyau62 closed this as completed Nov 19, 2021
@tlyau62 tlyau62 reopened this Nov 19, 2021
@lencil
Copy link

lencil commented Jun 10, 2022

try node-sass instead of sass.

@phil-w
Copy link

phil-w commented Nov 29, 2022

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

@KooWeiHao
Copy link

KooWeiHao commented Jun 19, 2023

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

@thgh
Copy link
Owner

thgh commented Jun 19, 2023

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

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

5 participants