浏览器引用懒加载资源报错问题请教
Sharang-heng opened this issue · comments
Sharang-heng commented
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'),
);
部署项目到浏览器之后,能正常运行,但是偶尔浏览器会报加载不了资源的错误
Expected behavior
这个应用是主应用,子应用同样也有懒加载,不确定这样会不会有影响,想请教一下要如何处理这种情况
Actual behavior
No response
Version of ice.js
2.6.6
Content of build.json or ice.config.mts
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',
},
},
],
],
};
Additional context
No response