Bootstrap's sass is not working with new r2.0.0-next.66cc7a90 (with opt-in sass)
See original GitHub issueIs this a bug report?
Doubt it, but it might be interesting to know, due to the fact that bootstrap is recommended in the README, and bootstrap itself recommends using sass for its full potential
Relates to #3815
Environment
node -v
: 8.9.1yarn --version
(if you use Yarn): 1.6.0npm ls react-scripts
(if you haven’t ejected): r2.0.0-next.66cc7a90- Operating system:
debian sid amd64
Steps to Reproduce
npx create-react-app myapp --scripts-version react-scripts@2.0.0-next.66cc7a90
- rename
index.css
toindex.scss
- update
index.js
to point toindex.scss
yarn add bootstrap
- open
index.scss
and add at the bottom@import "~bootstrap/scss/bootstrap.scss";
yarn && yarn start
Expected Behavior
No error is shown.
Actual Behavior
This error appears:
./src/index.scss
Module build failed:
module.exports = require('./lib/node-progress');
^
Invalid CSS after "m": expected 1 selector or at-rule, was "module.exports = re"
in bla/bla/bla/node_modules/progress/index.js (line 1, column 1)
More info
According to bootstrap:
For Bootstrap to compile, make sure you install and use the required loaders: sass-loader, postcss-loader with Autoprefixer
I think those loaders are missing, does anyone know if there’s an easy way to add them without ejecting?
I hope to be helpful,
Thanks to everyone!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Sass · Bootstrap v5.0
Utilize our source Sass files to take advantage of variables, maps, mixins, and functions to help you build faster and customize your project....
Read more >next.js - How do I implement the Sass features of Bootstrap 5 ...
I am working on a NextJS project, and I already have experience using Sass with NextJS. Now I am trying to build a...
Read more >React Bootstrap using Sass with custom theming
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >Introduction - React-Bootstrap
If you plan on customizing the Bootstrap Sass files, or don't want to use a CDN for the stylesheet, it may be helpful...
Read more >Chapter 7 Tidy your CSS with Sass
One of the main problem with CSS is to handle the growing number of files and the code repetition. Nowadays, web developers mainly...
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
Could the fixed alpha version be deployed to npm?
I merged the PR updating
sass-loader
to7.0.1
but I’ll leave this issue open for the time being.