Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const cssLoader = include => {
return context => ({
module: {
loaders: [
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
}
]
},
plugins: [new ExtractTextPlugin(CSS_OUTPUT_FILENAME)]
})
}
export default createConfig([
entryPoint(path.join(__dirname, WEB_APP_ENTRY_POINT)),
setOutput({
path: path.join(__dirname, WEB_APP_DIR, OUTPUT_PATH),
publicPath: '/_diag/',
filename: JS_OUTPUT_FILENAME
}),
cssLoader(),
addPlugins([
// This helps ensure the builds are consistent if source hasn't changed:
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(ENV)
}
}),
new ManifestPlugin()
]),