I\'m using webpack to build my react components and I\'m trying to use the extract-text-webpack-plugin
to separate my css from my generated js file. However, wh
If you're using Webpack 2, this variation works:
rules: [{
test: /\.css$/,
exclude: '/node_modules/',
use: ExtractTextPlugin.extract({
fallback: [{
loader: 'style-loader',
}],
use: [{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]--[hash:base64:5]',
},
}, {
loader: 'postcss-loader',
}],
}),
}]
The new extract method no longer takes three arguments, and is listed as a breaking change when moving from V1 to V2.
https://webpack.js.org/guides/migrating/#extracttextwebpackplugin-breaking-change