Skip to content

Instantly share code, notes, and snippets.

@gavindoughtie
Created December 22, 2016 23:12
Show Gist options
  • Save gavindoughtie/ce96eded8fdd0bea2d60307f21e96991 to your computer and use it in GitHub Desktop.
Save gavindoughtie/ce96eded8fdd0bea2d60307f21e96991 to your computer and use it in GitHub Desktop.
Correct exports.extractCSS
exports.extractCSS = function(paths) {
return {
module: {
rules: [
// Extract CSS during build
{
test: /\.css$/,
include: paths,
loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
loader: {loader: 'css-loader'}
})
}
],
},
plugins: [
// Output extracted CSS to a file
new ExtractTextPlugin({
filename: '[name].[chunkhash].css',
disable: false,
allChunks: true
})
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment