Created
December 22, 2016 23:12
-
-
Save gavindoughtie/ce96eded8fdd0bea2d60307f21e96991 to your computer and use it in GitHub Desktop.
Correct exports.extractCSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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