Skip to content

Commit 2cff34c

Browse files
authored
Clarify why we only need css?-autoprefixer in development
Fixes #377
1 parent c5cdbd5 commit 2cff34c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

config/webpack.config.prod.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,12 @@ module.exports = {
116116
include: [paths.appSrc, paths.appNodeModules],
117117
// "?-autoprefixer" disables autoprefixer in css-loader itself:
118118
// https://github.com/webpack/css-loader/issues/281
119-
// We already have it thanks to postcss.
119+
// We already have it thanks to postcss. We only pass this flag in
120+
// production because "css" loader only enables autoprefixer-powered
121+
// removal of unnecessary prefixes when Uglify plugin is enabled.
122+
// Webpack 1.x uses Uglify plugin as a signal to minify *all* the assets
123+
// including CSS. This is confusing and will be removed in Webpack 2:
124+
// https://github.com/webpack/webpack/issues/283
120125
loader: ExtractTextPlugin.extract('style', 'css?-autoprefixer!postcss')
121126
// Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
122127
},

0 commit comments

Comments
 (0)