Closed Sharang-heng closed 5 months ago
懒加载引入组件 const MapDetail = lazy(() => import(/ webpackChunkName: 'MapDetail' //webpackPrefetch: true/'@/pages/DataMap/components/Detail/Detail'));
const MetaInfoConfig = lazy( () => import(/ webpackChunkName: 'MetaInfoConfig' / '@/pages/MetaDataManage/component/MetaDataConfig'), ); 部署项目到浏览器之后,能正常运行,但是偶尔浏览器会报加载不了资源的错误
这个应用是主应用,子应用同样也有懒加载,不确定这样会不会有影响,想请教一下要如何处理这种情况
No response
2.6.6
const version = require('./package.json'); const path = require('path'); module.exports = { outputDir: `dist@v${version.version.replace(/\./g, '_')}`, hash: true, proxy: { }, plugins: [ 'configplugin', [ 'build-plugin-ignore-style', { libraryName: 'antd', }, ], ['build-plugin-keep-alive'], ['build-plugin-jsx-plus'], [ 'build-plugin-antd', { disableModularImport: true, themeConfig: { 'primary-color': '#0069ff', 'link-color': '#0069ff', 'success-color': '#389e0d', 'warning-color': '#fe823e', 'error-color': '#fe3e3e', 'border-color-base': '#e4e7ed', 'border-radius-base': '4px', }, }, ], ], };
关注异步资源加载的地址,如果是调试过程发生,可以参考文档
Describe the bug
懒加载引入组件 const MapDetail = lazy(() => import(/ webpackChunkName: 'MapDetail' //webpackPrefetch: true/'@/pages/DataMap/components/Detail/Detail'));
const MetaInfoConfig = lazy( () => import(/ webpackChunkName: 'MetaInfoConfig' / '@/pages/MetaDataManage/component/MetaDataConfig'), ); 部署项目到浏览器之后,能正常运行,但是偶尔浏览器会报加载不了资源的错误
![image](https://github.com/alibaba/ice/assets/69613396/4144c303-0f50-41d7-b416-286b19f001c2)
Expected behavior
这个应用是主应用,子应用同样也有懒加载,不确定这样会不会有影响,想请教一下要如何处理这种情况
Actual behavior
No response
Version of ice.js
2.6.6
Content of build.json or ice.config.mts
Additional context
No response