Skip to content

Instantly share code, notes, and snippets.

@dtinth dtinth/app.js
Created Sep 15, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.