1.已经使用npx @dcloudio/uvm alpha 升级到最新版本的核心包
2.已经存在依赖"@dcloudio/uni-mp-xhs": "3.0.0-alpha-3080720230627002" 和手动加入了打包脚本
- 报错内容如下
- Uncaught ReferenceError: vue is not defined
at Object.vue (external "vue":1)
at webpack_require (bootstrap:19)
at Object../resources/app/extensions/xhs-mp-extension/node_modules/swc-loader/src/index.js??clonedRuleSet-2.use[0]!./resources/app/extensions/xhs-mp-extension/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./resources/app/extensions/xhs-mp-extension/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/app/extensions/xhs-mp-extension/node_modules/@xhs/mp-cli/lib/webpack-config/loaders/ml-loader/index.js??ruleSet[0].use[1]!g:\project\songzan\dist\dev\mp-xhs\pages\travel\index.xhsml?vue&type=template&id=68cda4e8 (cssWithMappingToString.js:32)
at webpack_require (bootstrap:19)
at Object.g:\project\songzan\dist\dev\mp-xhs\pages\travel\index.xhsml?vue&type=template&id=68cda4e8 (g:\project\songzan\dist\dev\mp-xhs\pages\travel\index.xhsml?2e77:23)
at webpack_require (bootstrap:19)
at Object.g:\project\songzan\dist\dev\mp-xhs\pages\travel\index.xhsml (g:\project\songzan\dist\dev\mp-xhs\pages\travel\index.xhsml:4)
at webpack_require (bootstrap:19)
at make namespace object:7
at index.render.js?t=35b53595cf4c5:1339
5.核心报错就是 vue is not defined 还未到业务层前端就报错了