How to introduce antd Vue on demand in vite2 #2327
-
跟着antd官网的要求创建.babel.config.js或者.babelrc,在里面添加antd官网推荐配置,但是在引入antd组件时,浏览器控制台报警告“You are using a whole package of antd, please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size. Not support Vite !!!” Follow the requirements of the antd official website to create babel.config.js Or. Babelrc, add the recommended configuration of the antd official website, but when introducing the antd component, the browser console will give a warning "you are using a whole package of antd, please use" https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size. Not support Vite !!!” |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
https://github.com/anncwb/vite-plugin-style-import This plug-in can be introduced on demand. But it can't shield the console warning, it needs antd to provide configuration to close |
Beta Was this translation helpful? Give feedback.
https://github.com/anncwb/vite-plugin-style-import
This plug-in can be introduced on demand. But it can't shield the console warning, it needs antd to provide configuration to close