h5项目(包括uni-admin)集成了uni-id-pages后,不能发行,发行的时候打包失败
[HBuilder] 23:05:13.878 [vite]: Rollup failed to resolve import "uni_modules/uni-id-pages/static/limeClipper/photo.svg" from "D:__code_space\uni-app\echeguan-2.0-mp-business\uni_modules\uni-id-pages\pages\userinfo\cropImage\limeClipper\limeClipper.vue".
[HBuilder] 23:05:13.878 This is most likely unintended because it can break your application at runtime.
[HBuilder] 23:05:13.889 If you do want to externalize this module explicitly add it to
[HBuilder] 23:05:13.890 build.rollupOptions.external
[HBuilder] 23:05:13.900 error during build:
[HBuilder] 23:05:13.901 Error: [vite]: Rollup failed to resolve import "unimodules/uni-id-pages/static/limeClipper/photo.svg" from "D:_code_space\uni-app\echeguan-2.0-mp-business\uni_modules\uni-id-pages\pages\userinfo\cropImage\limeClipper\limeClipper.vue".
[HBuilder] 23:05:13.911 This is most likely unintended because it can break your application at runtime.
[HBuilder] 23:05:13.911 If you do want to externalize this module explicitly add it to
[HBuilder] 23:05:13.921 build.rollupOptions.external
[HBuilder] 23:05:13.921 at onRollupWarning (C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\vite\dist\node\chunks\dep-c9998dc6.js:41797:19)
[HBuilder] 23:05:13.934 at onwarn (C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\vite\dist\node\chunks\dep-c9998dc6.js:41613:13)
[HBuilder] 23:05:13.934 at Object.onwarn (C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\rollup\dist\shared\rollup.js:22978:13)
[HBuilder] 23:05:13.944 at ModuleLoader.handleResolveId (C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\rollup\dist\shared\rollup.js:22322:26)
[HBuilder] 23:05:13.945 at C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\rollup\dist\shared\rollup.js:22299:26
[HBuilder] 23:05:13.957 项目 'echeguan-2.0-mp-business' 发布h5失败.
4***@qq.com
- 发布:2022-09-22 23:13
- 更新:2022-10-08 18:24
- 阅读:946
#插件讨论# 【 uni-id-pages - DCloud前端团队 】h5项目(包括uni-admin)集成了uni-id-pages后,不能发行,发行的时候打包失败
分类:uni-app
关联插件:
uni-id-pages
3 个回复
982260355
是的,我也是。是vue3 vite的问题,你切换到vue2就好了。希望官方早日修复
DCloud_uniCloud_WYQ
可以参考这个提交进行修改,下次发布时会修复此问题:https://gitcode.net/dcloud/hello_uni-id-pages/-/commit/9aa672ecd2684bf66363d1e96780ba242dab3279
1***@qq.com
关注+1