Skip to content

Commit

Permalink
Treat .css and .sass/.scss as side effectful (facebook#5197)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Oct 1, 2018
1 parent bd63618 commit 0189b80
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,11 @@ module.exports = {
importLoaders: 1,
sourceMap: shouldUseSourceMap,
}),
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
// Remove this when webpack adds a warning or an error for this.
// See https://github.com/webpack/webpack/issues/6571
sideEffects: true,
},
// Adds support for CSS Modules (https://github.com/css-modules/css-modules)
// using the extension .module.css
Expand Down Expand Up @@ -397,6 +402,11 @@ module.exports = {
},
'sass-loader'
),
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
// Remove this when webpack adds a warning or an error for this.
// See https://github.com/webpack/webpack/issues/6571
sideEffects: true,
},
// Adds support for CSS Modules, but using SASS
// using the extension .module.scss or .module.sass
Expand Down

0 comments on commit 0189b80

Please sign in to comment.