@@ -16,12 +16,12 @@ const hyphenate = str => {
1616 * @param {string } prefix The prefix for the component library
1717 * @param {string } component The component name for single entry builds, component file for multi-entry builds
1818 * @param {string } file The file for the component
19- * @param {boolean } async Whether to load component async or not
19+ * @param {boolean } isAsync Whether to load component async or not
2020 */
21- const createElement = ( prefix , component , file , async ) => {
21+ const createElement = ( prefix , component , file , isAsync ) => {
2222 const { camelName, kebabName } = exports . fileToComponentName ( prefix , component )
2323
24- return async
24+ return isAsync
2525 ? `window.customElements.define('${ kebabName } ', wrap(Vue, () => import('~root/${ file } ?shadow')))\n`
2626 : `import ${ camelName } from '~root/${ file } ?shadow'\n` +
2727 `window.customElements.define('${ kebabName } ', wrap(Vue, ${ camelName } ))\n`
@@ -38,12 +38,12 @@ exports.fileToComponentName = (prefix, file) => {
3838 }
3939}
4040
41- exports . resolveEntry = ( prefix , libName , files , async ) => {
41+ exports . resolveEntry = ( prefix , libName , files , isAsync ) => {
4242 const filePath = path . resolve ( __dirname , 'entry-wc.js' )
4343 const elements =
4444 prefix === ''
4545 ? [ createElement ( '' , libName , files [ 0 ] ) ]
46- : files . map ( file => createElement ( prefix , file , file , async ) ) . join ( '\n' )
46+ : files . map ( file => createElement ( prefix , file , file , isAsync ) ) . join ( '\n' )
4747
4848 const content = `
4949import './setPublicPath'
0 commit comments