Skip to content

Commit 346a069

Browse files
committed
Clarify why we only need css?-autoprefixer in development
Fixes wmonk#377
1 parent 0298a81 commit 346a069

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

config/webpack.config.prod.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ module.exports = {
109109
include: [paths.appSrc, paths.appNodeModules],
110110
// "?-autoprefixer" disables autoprefixer in css-loader itself:
111111
// https://github.com/webpack/css-loader/issues/281
112-
// We already have it thanks to postcss.
112+
// We already have it thanks to postcss. We only pass this flag in
113+
// production because "css" loader only enables autoprefixer-powered
114+
// removal of unnecessary prefixes when Uglify plugin is enabled.
115+
// Webpack 1.x uses Uglify plugin as a signal to minify *all* the assets
116+
// including CSS. This is confusing and will be removed in Webpack 2:
117+
// https://github.com/webpack/webpack/issues/283
113118
loader: ExtractTextPlugin.extract('style', 'css?-autoprefixer!postcss')
114119
// Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
115120
},

0 commit comments

Comments
 (0)