
SyntaxError: Unexpected token 'export'
(env: macOS,mp,1.06.2208010; lib: 2.25.2)
SyntaxError: Cannot use import statement outside a module
(env: macOS,mp,1.06.2208010; lib: 2.25.2)

将JS编译成ES5✅

uniapp在manifest.json 中✅

"lazyCodeLoading" : "requiredComponents", // 添加在manifest.json "mp-weixin" 下级 --uniapp 微信小程序原生放在app.json中 macos 上面的es5✅就可以解决,windows需要这样改一下
已被代码依赖分析忽略,无法被其他模块引用。你可根据控制台中的【代码依赖分析】告警信息修改代码,或关闭【过滤无依赖文件】功能。
uniapp 在manifest.json中 "mp-weixin" -> "setting" 下级
"ignoreDevUnusedFiles" : false,
参考文章一
https://blog.csdn.net/weixin_58012451/article/details/124825315
参考文章二https://blog.csdn.net/zhenghhgz/article/details/125678359
hbuildx报错 operation not permitted
把dist文件夹删除重新生成
参考文章三
https://developers.weixin.qq.com/community/minihome/doc/0002ac27434928cf3e7bf20e651000
网友评论