babel-plugin-import
babel-plugin-import copied to clipboard
The Note in the README.md file is not clear.
The sentence in the README.md file is not giving clear instructions.
babel-plugin-import will not work properly if you add the library to the webpack config vendor.
- So how should I configure webpack?
- Should I separate my app and vendors to different js files?
- How should I configure webpack 4 to make this work?
Please improve the readme for this repository, it really is not very clear and I had to use several external articles to configure the plugin correctly. It doesn't properly explain all of the parameter and configuration options.
Agreed. In my Nuxt application, I see "You are using a whole package of antd, please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size." Of course, the README only talks about React apps, no idea if this has any difference since Nuxt uses Vue.JS.
I loaded it up with Nuxt's extend
option anyway. It did nothing. Not sure if there needs to be additional options for Nuxt because there is no guide.
I should note that Ant Design Vue takes about 1.75MB-2MB and refers to that link above as their only guide for how to eliminate that. This needs to be fixed.
@louiskenyon98 How were you able to get around it? Do you still have links to the websites that you used as guides? If I can figure it out, I would be happy to submit a PR :)