File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,16 @@ const HtmlWebpackPlugin = require('html-webpack-plugin')
33const BundleAnalyzerPlugin = require ( 'webpack-bundle-analyzer' ) . BundleAnalyzerPlugin
44
55module . exports = function override ( config , env ) {
6- // compile sass
6+ // remove the css loader to simplify things
7+ config . module . rules [ 1 ] . oneOf = config . module . rules [ 1 ] . oneOf . filter ( function ( l ) {
8+ const test = l . test && l . test . toString ( )
9+ return test !== / \. c s s $ /
10+ } )
11+ // compile sass, this comes first and compresses css as well as loading sass/scss
712 // https://github.com/facebookincubator/create-react-app/issues/2498
8- config . module . rules [ 1 ] . oneOf . splice ( config . module . rules [ 1 ] . oneOf . length - 1 , 0 ,
13+ config . module . rules [ 1 ] . oneOf . splice ( 0 , 0 ,
914 {
10- test : / \. s c s s $ / ,
15+ test : / \. ( s a s s | s c s s | c s s ) $ / ,
1116 use : [
1217 'style-loader' ,
1318 'css-loader' ,
You can’t perform that action at this time.
0 commit comments