Skip to content

Instantly share code, notes, and snippets.

@gavindoughtie
Created December 22, 2016 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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