We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 448ab96 commit 8a3dfa4Copy full SHA for 8a3dfa4
packages/@vue/cli-service/lib/config/app.js
@@ -33,8 +33,15 @@ module.exports = (api, options) => {
33
.filename(outputFilename)
34
.chunkFilename(outputFilename)
35
36
- webpackConfig.optimization
37
- .set('realContentHash', false)
+ const webpack = require('webpack')
+ const { semver } = require('@vue/cli-shared-utils')
38
+ const webpackMajor = semver.major(webpack.version)
39
+ if (webpackMajor !== 4) {
40
+ // FIXME: a temporary workaround to get accurate contenthash in `applyLegacy`
41
+ // Should use a better fix per discussions at <https://github.com/jantimon/html-webpack-plugin/issues/1554#issuecomment-753653580>
42
+ webpackConfig.optimization
43
+ .set('realContentHash', false)
44
+ }
45
46
// code splitting
47
if (process.env.NODE_ENV !== 'test') {
0 commit comments