Taro 4.x + vite + vue3 打包小程序如何使用分包异步化组件? #18133
Replies: 1 comment
-
// config/index.js
plugins: [
[
'@tarojs/plugin-framework-vue3',
{
vueLoaderOption: {
compilerOptions: {
isCustomElement: (tag) => tag.includes('test-widget'),
// whitespace: 'preserve'
},
reactivityTransform: true, // 开启vue3响应性语法糖
},
},
]
] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
usingComponents与componentPlaceholder都已正常配置。
小程序开发工具中会提示警告:
[Vue warn]: Failed to resolve component: test-widget If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
以下是尝试过的配置方式:
以上方式都未解决异步组件问题,组件在小程序中无法加载渲染!!!
Beta Was this translation helpful? Give feedback.
All reactions