Skip to content

Commit 66bab8c

Browse files
committed
fix: respect chunk name in all build targets
close #1251
1 parent c3d246f commit 66bab8c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/@vue/cli-service/lib/commands/build/resolveLibConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module.exports = (api, { entry, name }, options) => {
8282

8383
Object.assign(rawConfig.output, {
8484
filename: `${entryName}.js`,
85-
chunkFilename: `${entryName}.[id].js`,
85+
chunkFilename: `${entryName}.[name].js`,
8686
library: libName,
8787
libraryExport: 'default',
8888
libraryTarget: format,

packages/@vue/cli-service/lib/commands/build/resolveWcConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ module.exports = (api, { target, entry, name }) => {
112112

113113
Object.assign(rawConfig.output, {
114114
filename: `${entryName}.js`,
115-
chunkFilename: `${libName}.[id]${minify ? `.min` : ``}.js`,
115+
chunkFilename: `${libName}.[name]${minify ? `.min` : ``}.js`,
116116
// use dynamic publicPath so this can be deployed anywhere
117117
// the actual path will be determined at runtime by checking
118118
// document.currentScript.src.

packages/@vue/cli-service/lib/config/prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = (api, options) => {
66
.devtool('source-map')
77
.output
88
.filename(`js/[name].[chunkhash:8].js`)
9-
.chunkFilename(`js/[name].[id].[chunkhash:8].js`)
9+
.chunkFilename(`js/[name].[chunkhash:8].js`)
1010

1111
// keep module.id stable when vendor modules does not change
1212
webpackConfig

0 commit comments

Comments
 (0)