-
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
h5打包移除懒加载后打包报错 #16933
Comments
This was referenced Nov 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
H5
浏览器版本: Chrome 131.0.6778.86
使用框架: React
复现步骤
根据文档https://taro-docs.jd.com/blog/2022-01-20-Taro-3.4#3-dynamic-import-node ,在taro项目中的babel.config.js增加如下配置后打包
presets: [
[
'taro',
{
framework: 'react',
ts: true,
hot: false,
'dynamic-import-node': true,
},
],
],
期望结果
h5正常移除懒加载打包不报错
实际结果
打包后报如下错
hook.js:608 Error: Cannot find module './taro-view-core.entry.js'
at webpackEmptyContext (eval at ./node_modules/@tarojs/components/dist/esm-es5 sync recursive (app.6bd2a42….js:4915:1), :2:10)
at eval (index-5bd7cbab.js:1482:1) undefined
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'isProxied')
at eval (index-5bd7cbab.js:1248:1)
at i (index-5bd7cbab.js:125:1)
at Object.eval [as next] (index-5bd7cbab.js:74:1)
at s (index-5bd7cbab.js:33:1)
环境信息
The text was updated successfully, but these errors were encountered: