mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-23 04:58:56 -05:00
fix(web-component): fix multiple wc-async bundles on the same page
close #1150
This commit is contained in:
@@ -109,6 +109,9 @@ module.exports = (api, { target, entry, name }) => {
|
||||
}
|
||||
|
||||
Object.assign(rawConfig.output, {
|
||||
// to ensure that multiple copies of async wc bundles can co-exist
|
||||
// on the same page.
|
||||
jsonpFunction: libName.replace(/-\w/g, c => c.charAt(1).toUpperCase()) + '_jsonp',
|
||||
filename: `${entryName}.js`,
|
||||
chunkFilename: `${libName}.[name]${minify ? `.min` : ``}.js`,
|
||||
// use dynamic publicPath so this can be deployed anywhere
|
||||
|
||||
Reference in New Issue
Block a user