Bootstrap Sass not recognized
See original GitHub issue- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) Running in docker on ElementaryOS (Latest)
- Versions. Please run
ng --version
. If there’s nothing outputted, please run in a Terminal:node --version
and paste the result here: angular-cli: 1.0.0-beta.11-webpack.2 node: 5.12.0 os: linux x64 - Repro steps. Was this an app that wasn’t created using the CLI? What change did you do on your code? etc. Just upgraded to rc5.
- The log given by the failure. Normally this include a stack trace and some more information. None
- Mention any other details that might be useful.
I want to use the bootstrap-sass repo from npm, but webpack is not recognizing it. I read about a bootstrap-sass-loader for webpack, but I can’t find the webpack config file. Anyway I can add/edit loaders etc.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
gruntjs - @import bootstrap-sass not working - Stack Overflow
I moved that file into my own sass folder, then changed the paths of all the files in the bootstrap.scss file. This youtube...
Read more >Theming Bootstrap
Customize Bootstrap 4 with our new built-in Sass variables for global style preferences for easy theming and component changes.
Read more >How to Customize Bootstrap with Sass - freeCodeCamp
The solution is to use Sass – a CSS preprocessor. Sass is compiled down to CSS before it's used on web pages. Until...
Read more >Sass Compiler NOT Working in Visual Studio Code - YouTube
In this tutorial I am going to explain how to fix the visual studio code live sass compiler extension if it is not...
Read more >sass-loader - webpack - JS.ORG
Node Sass does not work with Yarn PnP feature and doesn't support @use rule. ... Webpack needs to distinguish between bootstrap and ~bootstrap...
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 Free
Top 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
Still doesn’t really solve the problem, as importing
bootstrap
from it’s npm package, can also include overriding variables just for that specific component… Or using variables like thedefault padding
to keep up with code styling throughout your application etc.Global styles do not solve a sass import…
example: component.scss:
I now have to import it from the downloaded source file, which I have to manually update. Instead of using the npm package.
It doesn’t really matter if angular-cli has global styles, it matters that it recognizes npm sass packages.
More information https://github.com/jtangelder/sass-loader
PS. I tried the
~
method in the sass-loader, still doesn’t work with angular-cliComponents in Angular 2 have their css encapsulated, which means that they don’t bleed out onto other parts of your app. Unfortunately, it also means that you can’t really import bootstrap in your component.
We added global styles to address this: https://github.com/angular/angular-cli#global-styles. It should be available in the next webpack release.