-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用自定义组件,控制台很多Failed to resolve component的警告 #16607
Comments
This was referenced Sep 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
微信小程序
小程序基础库: 3.5.8
使用框架: Vue 3
复现步骤
在index.config.ts里配置export default {
navigationStyle: 'custom',
enableShareAppMessage: true,
navigationBarTitleText: ' ',
transparentTitle: 'always',
titlePenetrate: 'YES',
navigationBarTextStyle: 'white',
backgroundColor: '#ffffff',
enablePullDownRefresh: false,
disableScroll: true,
usingComponents: {
'debug-tool': '../../scopeComponent/DebugTool',
},
componentPlaceholder: {
'debug-tool': 'View',
},
};
会导致微信小程序有警告[Vue warn]: Failed to resolve component: debug-tool
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
按照官网教程配置
[
'@tarojs/plugin-framework-vue3',
{
vueLoaderOption: {
compilerOptions: {
isCustomElement: (tag) => tag.includes('debug'),
whitespace: 'preserve',
},
reactivityTransform: true, // 开启vue3响应性语法糖
},
},
],
依然有警告
期望结果
控制台没有[Vue warn]: Failed to resolve component的警告
实际结果
所有用usingComponents配置的这种的组件全部都报了警告
环境信息
The text was updated successfully, but these errors were encountered: