Skip to content
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

🐛 [BUG] dynamicImport配置报错 #11208

Open
chenboxiang opened this issue Apr 9, 2024 · 0 comments
Open

🐛 [BUG] dynamicImport配置报错 #11208

chenboxiang opened this issue Apr 9, 2024 · 0 comments

Comments

@chenboxiang
Copy link

🐛 bug 描述

在config.ts中配置dynamicImport为false时报错

📷 复现步骤 | Recurrence steps

在config.ts中增加dynamicImport:false配置,然后执行npm run build

🏞 期望结果 | Expected results

期望配置后,js打包成1个文件

💻 复现代码 | Recurrence code

在pro client生成的simple模式的项目配置文件config.ts中,加1行配置:dynamicImport: false,

© 版本信息

  • Ant Design Pro 版本:
  • umi 版本:4.1.8
  • 浏览器环境
  • 开发环境:mac OS

🚑 其他信息

[email protected] build
max build

fatal - AssertionError [ERR_ASSERTION]: Invalid config keys: dynamicImport
at Config.validateConfig (/Users/chenboxiang/dev/fe-projects/xproject-b-pc/node_modules/@umijs/core/dist/config/config.js:209:31)
at Config.getConfig (/Users/chenboxiang/dev/fe-projects/xproject-b-pc/node_modules/@umijs/core/dist/config/config.js:67:12)
at Service.resolveConfig (/Users/chenboxiang/dev/fe-projects/xproject-b-pc/node_modules/@umijs/core/dist/service/service.js:352:55)
at Service.run (/Users/chenboxiang/dev/fe-projects/xproject-b-pc/node_modules/@umijs/core/dist/service/service.js:276:42)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Service.run2 (/Users/chenboxiang/dev/fe-projects/xproject-b-pc/node_modules/umi/dist/service/service.js:65:12)
at async run (/Users/chenboxiang/dev/fe-projects/xproject-b-pc/node_modules/umi/dist/cli/cli.js:56:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
fatal - A complete log of this run can be found in:
fatal - /Users/chenboxiang/dev/fe-projects/xproject-b-pc/node_modules/.cache/logger/umi.log
fatal - Consider reporting a GitHub issue on https://github.com/umijs/umi/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant