Skip to content

Commit 369f972

Browse files
committed
fix(build): fix global object when building as lib with async chunks
close #1607
1 parent 7761808 commit 369f972

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
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
@@ -88,7 +88,7 @@ module.exports = (api, { entry, name }, options) => {
8888
// libraryTarget: 'esm' or target: 'universal'
8989
// https://github.com/webpack/webpack/issues/6522
9090
// https://github.com/webpack/webpack/issues/6525
91-
globalObject: `typeof self !== 'undefined' ? self : this`
91+
globalObject: `(typeof self !== 'undefined' ? self : this)`
9292
}, rawConfig.output, {
9393
filename: `${entryName}.js`,
9494
chunkFilename: `${entryName}.[name].js`,

0 commit comments

Comments
 (0)