Skip to content

Instantly share code, notes, and snippets.

@dtinth
Created September 15, 2017 19:26
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 dtinth/eeebb6c93e00933e3134b256f5566be9 to your computer and use it in GitHub Desktop.
Save dtinth/eeebb6c93e00933e3134b256f5566be9 to your computer and use it in GitHub Desktop.
Demonstrates the problem of DelegateModules not updating hash
console.log(require('./library'))
module.exports = 42
{
"devDependencies": {
"webpack": "^3.6.0"
}
}
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: [ './app' ],
output: {
path: path.join(__dirname, 'dist'),
filename: 'app_[chunkhash].js',
},
plugins: [
new webpack.DllReferencePlugin({
context: __dirname,
manifest: require('./dll/dll-manifest.json')
})
]
}
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: [ './library' ],
output: {
path: path.join(__dirname, 'dll'),
filename: 'dll.js',
library: 'dll_[hash]'
},
plugins: [
new webpack.DllPlugin({
path: path.join(__dirname, 'dll', "dll-manifest.json"),
name: 'dll_[hash]'
})
]
}
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: [ './library' ],
output: {
path: path.join(__dirname, 'dll'),
filename: 'dll.js',
library: 'dll_[hash]'
},
plugins: [
new webpack.DllPlugin({
path: path.join(__dirname, 'dll', "dll-manifest.json"),
name: 'dll_[hash]'
}),
new webpack.HashedModuleIdsPlugin()
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment