Anidetrix / rollup-plugin-styles

🎨 Universal Rollup plugin for styles: PostCSS, Sass, Less, Stylus and more.
https://anidetrix.github.io/rollup-plugin-styles
MIT License
242 stars 43 forks source link

Support resolving Sass modules without ~ in url #187

Open kherock opened 2 years ago

kherock commented 2 years ago

sass-loader has been recommending against using ~ in URLs since v11. Since then, some sass projects I use have been dropping the ~, and I can't use them without writing my own importer. Writing an importer which matches the code in this project isn't a small undertaking. As far as I'm aware, the only code in question is here:

https://github.com/Anidetrix/rollup-plugin-styles/blob/e09ac0927053ffba52410e1d36b6b1c74ae63155/src/loaders/sass/importer.ts#L21

I think it would be better to expose this behavior as an option, but I think that implementation should be straightforward as well.