// Note: You must restart bin/webpack-dev-server for changes to take effect/* eslint global-require: 0 */constwebpack=require('webpack')constmerge=require('webpack-merge')constCompressionPlugin=require('compression-webpack-plugin')constsharedConfig=require('./shared.js')module.exports=merge(sharedConfig,{output:{filename:'[name]-[chunkhash].js'},devtool:'source-map',stats:'normal',plugins:[// Code above removed for example// Add HashedModuleIdsPlugin// This plugin will cause hashes to be based on the relative path of the modulenewwebpack.HashedModuleIdsPlugin({hashDigestLength:20})]})
// Note: You must restart bin/webpack-dev-server for changes to take effect// Additional imports remove for exampleconstWebpackChunkHash=require('webpack-chunk-hash')module.exports={// Code above removed for exampleplugins:[newwebpack.EnvironmentPlugin(JSON.parse(JSON.stringify(env))),newWebpackChunkHash({algorithm:'md5'}),newExtractTextPlugin(env.NODE_ENV==='production'?'[name]-[chunkhash].css':'[name].css'),newManifestPlugin({publicPath:output.publicPath,writeToFileEmit:true})],// Code below removed for example}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.