File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
packages/@vue/cli-service/lib/config Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,15 @@ module.exports = (api, options) => {
33
33
. filename ( outputFilename )
34
34
. chunkFilename ( outputFilename )
35
35
36
- webpackConfig . optimization
37
- . set ( 'realContentHash' , false )
36
+ const webpack = require ( 'webpack' )
37
+ 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
+ }
38
45
39
46
// code splitting
40
47
if ( process . env . NODE_ENV !== 'test' ) {
You can’t perform that action at this time.
0 commit comments