1.uniapp主包pages/index/index 引用分包组件,运行小程序后报错
Component is not found in path "page_course/courseNew/index" (using by "pages/index/index"), may be missing corresponding "componentPlaceholder" option?
2.配置
"componentPlaceholder": {
"courseNew": "view",
}
坑1:放在"style":{}内,之前以为是放同级,一直不生效
3.页面直接引入组件
坑2:之前搜到的都是componentPlaceholder中配置的文件名需要和name一致,如果不是驼峰的是可以,但是驼峰的不能直接和name一致,而是小程序编译的时候查看需要保持一致