Created
September 15, 2017 19:26
-
-
Save dtinth/eeebb6c93e00933e3134b256f5566be9 to your computer and use it in GitHub Desktop.
Demonstrates the problem of DelegateModules not updating hash
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
console.log(require('./library')) |
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
module.exports = 42 |
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
{ | |
"devDependencies": { | |
"webpack": "^3.6.0" | |
} | |
} |
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
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') | |
}) | |
] | |
} |
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
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]' | |
}) | |
] | |
} |
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
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