lowcode-material物料库生产包支持antd的 4.24.9 或者5.x版本
Describe the bug (required) / 详细描述 bug(必填)
A clear and concise description of what the bug is. / 请提供清晰且精确的 bug 描述
问题1:在lowcode material物料库 通过设置build.lowcode.js的extraAssets实现开发环境的antd版本的支持到4.x的最后版本4.24.9,设置antd 5.x无效,通过打印window下的antd version版本能正确显示到4.24.9的版本。如果设置5.0.0 就会默认显示antd的默认4.17.3的版本。 问题2: 执行npm run lowcode:build 命令 在build/lowcode/index.js 构建生产包还是默认使用的antd的4.17.3版本,能否通过build.lowcode.js的设置让生产包支持4.24或者5.x版本。 问题3: 如果解决不了是否只能通过fork @alifd/build-plugin-lowcode 包进行antd的版本升级?
To Reproduce (required) / 如何复现 bug?(必填,非常重要)
Steps to reproduce the behavior: / 详细复现步骤:
English version example:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
中文版示例:

1.如何执行 npm run lowcode:dev 能生成指定的antd版本,期望是antd 5.x或者4.24的版本 2. 如何执行 npm run lowcode:build 能生成指定的antd版本,期望是antd 5.x或者4.24的版本
Expected behavior (required) / 预期行为(必填,非常重要)
A clear and concise description of what did you expect to happen. / 请清晰和精确的描述你预期的行为
Screenshots (optional) / bug 截图(可选)
Sceenshots for further information. (If applicable.) / 一些有用的截图将会帮助我们更好的明确以及定位问题
Environments (please complete the following information) (required): / 请提供如下信息(必填)
- AliLowCodeEngine version: [e.g. 1.0.0] / 低代码引擎版本
- AliLowCodeEngineExt version: [e.g. 1.0.0] / 低代码引擎扩展包版本
- Browser [e.g. chrome, safari] / 浏览器版本
- materials / plugins / tools / 其他物料 / 插件 / 工具链版本
(this information can be collected via the manual plugin / 版本信息可通过低代码用户手册插件收集)
Additional context (optional) / 更多额外信息(可选)
Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题
Expected behavior (required) / 预期行为(必填,非常重要)
A clear and concise description of what did you e English version example:000000000949-2-tps-3066-1650.png))
Additional context (optional) / 更多额外信息(可选)
Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题
前些日子,build-plugin-lowcode 刚支持了这个能力,可以在 extraAssets 里配置,替换内置的版本。
我是这么写的 倒是能用 不知道还有什么坑
module.exports = {
plugins: [
[
'@alifd/build-plugin-lowcode',
{
builtinAssets: [
{
packages: [
{
package: 'antd',
version: '5.9.2',
urls: [
'https://cdn.jsdelivr.net/npm/[email protected]/dayjs.min.js', // 先引入dayjs就不报错了
`https://cdn.jsdelivr.net/npm/[email protected]/dist/antd.min.js`,
],
library: 'antd',
},
]
}
]
},
],
],
};
@rain0002009 我.....服了 单独引入dayjs用不了, 非要像你这么写才不报错