Skip to content

Commit cd6db82

Browse files
committed
fix: use .needsDifferentialLoading instead of .module
Because we now automatically skips differential loading if all targets support es module, regardless of the `.module` flag
1 parent a1979bd commit cd6db82

File tree

1 file changed

+3
-2
lines changed
  • packages/@vue/cli-service/lib/commands/build

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ module.exports = (api, options) => {
6464
needsDifferentialLoading = false
6565
}
6666

67+
args.needsDifferentialLoading = needsDifferentialLoading
6768
if (!needsDifferentialLoading) {
6869
await build(args, api, options)
6970
return
@@ -109,7 +110,7 @@ async function build (args, api, options) {
109110
log()
110111
const mode = api.service.mode
111112
if (args.target === 'app') {
112-
const bundleTag = args.module
113+
const bundleTag = args.needsDifferentialLoading
113114
? args.moduleBuild
114115
? `module bundle `
115116
: `legacy bundle `
@@ -131,7 +132,7 @@ async function build (args, api, options) {
131132
}
132133

133134
const targetDir = api.resolve(options.outputDir)
134-
const isLegacyBuild = args.target === 'app' && args.module && !args.moduleBuild
135+
const isLegacyBuild = args.needsDifferentialLoading && !args.moduleBuild
135136

136137
// resolve raw webpack config
137138
let webpackConfig

0 commit comments

Comments
 (0)