fix: respect chunk name in all build targets

close #1251
This commit is contained in:
Evan You
2018-05-09 17:46:42 -04:00
parent c3d246f7a2
commit 66bab8c029
3 changed files with 3 additions and 3 deletions

View File

@@ -82,7 +82,7 @@ module.exports = (api, { entry, name }, options) => {
Object.assign(rawConfig.output, {
filename: `${entryName}.js`,
chunkFilename: `${entryName}.[id].js`,
chunkFilename: `${entryName}.[name].js`,
library: libName,
libraryExport: 'default',
libraryTarget: format,

View File

@@ -112,7 +112,7 @@ module.exports = (api, { target, entry, name }) => {
Object.assign(rawConfig.output, {
filename: `${entryName}.js`,
chunkFilename: `${libName}.[id]${minify ? `.min` : ``}.js`,
chunkFilename: `${libName}.[name]${minify ? `.min` : ``}.js`,
// use dynamic publicPath so this can be deployed anywhere
// the actual path will be determined at runtime by checking
// document.currentScript.src.

View File

@@ -6,7 +6,7 @@ module.exports = (api, options) => {
.devtool('source-map')
.output
.filename(`js/[name].[chunkhash:8].js`)
.chunkFilename(`js/[name].[id].[chunkhash:8].js`)
.chunkFilename(`js/[name].[chunkhash:8].js`)
// keep module.id stable when vendor modules does not change
webpackConfig