babel-plugin-import icon indicating copy to clipboard operation
babel-plugin-import copied to clipboard

The Note in the README.md file is not clear.

Open erdemkeren opened this issue 5 years ago • 3 comments

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?

erdemkeren avatar Jun 11 '19 17:06 erdemkeren

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.

louiskenyon98 avatar Jun 12 '19 08:06 louiskenyon98

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.

KB1RD avatar Nov 04 '19 23:11 KB1RD

@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 :)

KB1RD avatar Nov 08 '19 14:11 KB1RD