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
🐛 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,
© 版本信息
🚑 其他信息
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