Sass import from node_modules not working
See original GitHub issueTrying to import some scss-files in from the bootstrap node_module in my vue-library, e.g:
<style lang="scss" scoped> @import '~bootstrap/scss/_buttons'; </style>
This is not working, found out it’s most likely due to this issue: https://github.com/differui/rollup-plugin-sass/issues/38
Wondering if it’s possible to get the default sass-config to include the ‘~’ alias by default (to match the app code written with Poi). Everything is working so good it feels bad to add a config-file just for this issue, that’s probably pretty common 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to import from "node_modules" in sass file #727 - GitHub
I have installed bourbon library through npm, but it's not working when I import it in my stylesheet app.scss @import "bourbon"; How can...
Read more >Importing Sass through npm - node.js - Stack Overflow
Since node_modules/npm-module-name/style.scss exists, this will be imported. @import "npm-module-name"; // Since just-a-sass-file isn't an installed npm ...
Read more >Import a SCSS files from Node Modules - Laracasts
Hi, I'm trying to load some styles from the node_modules folder. But it's a real pain to do so. Usually, when I'm not...
Read more >Sass @use (NOT @import) with node_modules paths - Reddit
I'm using Webpack and Dart Sass, and it seems that the traditional ~ (tilde) shortcut to node_modules does not work with \@use.
Read more >sass-loader - webpack - JS.ORG
Node Sass does not work with Yarn PnP feature and doesn't support @use rule. Warning ... then the loader will try to resolve...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This feature landed in rollup-plugin-postcss@1.3.0, re-install bili and you will receive the updates.
I was able to solve it by just using:
@import "node_modules/bootstrap/scss/bootstrap";