Bootstrap's sass is not working with new r2.0.0-next.66cc7a90 (with opt-in sass)
Created by: woile
Is 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 (closed)
Environment
-
node -v
: 8.9.1 -
yarn --version
(if you use Yarn): 1.6.0 -
npm 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!