fix(build): fix global object when building as lib with async chunks

close #1607
This commit is contained in:
Evan You
2018-07-17 11:54:54 -04:00
parent 7761808561
commit 369f97238e
@@ -88,7 +88,7 @@ module.exports = (api, { entry, name }, options) => {
// libraryTarget: 'esm' or target: 'universal'
// https://github.com/webpack/webpack/issues/6522
// https://github.com/webpack/webpack/issues/6525
globalObject: `typeof self !== 'undefined' ? self : this`
globalObject: `(typeof self !== 'undefined' ? self : this)`
}, rawConfig.output, {
filename: `${entryName}.js`,
chunkFilename: `${entryName}.[name].js`,