问题描述
根据文档 Docs 建议使用模块化的 antd 以确保优化并减小应用程序大小。但是,我尝试在我的 nuxt 构建配置中使用确切的代码,但应用程序大小在使用 yarn build
下面是我的nuxt构建配置和构建前后的截图
build: {
analyze: true,// Remove this mode before deployment
babel: {
plugins: [
[
"import",{
libraryName: "ant-design-vue",libraryDirectory: "es",style: "css"
},]
]
}
}
这是添加babel-import-plugin前后的构建