Skip to content

Commit 59acae6

Browse files
nhunzakergaearon
authored andcommitted
PostCSS should run on @import statements. (facebook#929)
1 parent d7ecd92 commit 59acae6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-scripts/config/webpack.config.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ module.exports = {
137137
// in development "style" loader enables hot editing of CSS.
138138
{
139139
test: /\.css$/,
140-
loader: 'style!css!postcss'
140+
loader: 'style!css?importLoaders=1!postcss'
141141
},
142142
// JSON is not enabled by default in Webpack but both Node and Browserify
143143
// allow it implicitly so we also enable it.

packages/react-scripts/config/webpack.config.prod.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ module.exports = {
150150
// Webpack 1.x uses Uglify plugin as a signal to minify *all* the assets
151151
// including CSS. This is confusing and will be removed in Webpack 2:
152152
// https://github.com/webpack/webpack/issues/283
153-
loader: ExtractTextPlugin.extract('style', 'css?-autoprefixer!postcss')
153+
loader: ExtractTextPlugin.extract('style', 'css?importLoaders=1&-autoprefixer!postcss')
154154
// Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
155155
},
156156
// JSON is not enabled by default in Webpack but both Node and Browserify

0 commit comments

Comments
 (0)