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

Usage of "~" sign in imports #440

Open
siarheiyelin opened this issue Jan 9, 2023 · 0 comments
Open

Usage of "~" sign in imports #440

siarheiyelin opened this issue Jan 9, 2023 · 0 comments

Comments

@siarheiyelin
Copy link

siarheiyelin commented Jan 9, 2023

According to https://github.com/webpack-contrib/sass-loader#imports the "~" sign is deprecated in "style-loader". If "~" isn't specified, then it tries to resolve it as a relative path first. If it cannot be resolved, then the loader will try to resolve @import inside "node_modules".

It would be useful to support same logic for imports as implemented in "style-loader". i.e. look into "node_modules" even if "~" is not added. So that both ways to import files are supported:

  1. @import "~bootstrap/dist/css/bootstrap";
  2. @import "bootstrap/dist/css/bootstrap";
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

1 participant