Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this plugin will duplicate import modularly, at last the size is huge too. #184

Open
happypandaa opened this issue Oct 27, 2017 · 4 comments

Comments

@happypandaa
Copy link

use this plugin the file is more the size is biger.

one normal page. If i use CDN and set externals. the size (compressed) about 60kb-70kb.
use this plugin , the size (compressed) about 800kb .
i try comment some modularly, the size is reduce .

`

        {
       test: /\.js$/,
        loader: 'babel-loader',
        exclude: /node_modules/,
        query: {
          presets: [
            'es2015', "react"
          ],
          plugins: [
           [
             "import", {
               "libraryName": "antd"
             }
           ]
         ]
        }
      }`
@yunxifd
Copy link

yunxifd commented Dec 19, 2017

after upgrade babel-plugin-import from 1.2.1 to 1.6.2

the output:

snipaste_2017-12-19_10-37-24

the number of reference is equal to the times of Col used in the compoent

@osadchiynikita
Copy link

@yunxifd I have the same issue, did you have a chance to solve this with latest version, or you rolled version back to 1.2.1?

Thanks

@yunxifd
Copy link

yunxifd commented Mar 28, 2018

@osadchiynikita sorry ,I have not solve the problem.

@osadchiynikita
Copy link

@yunxifd thanks for answer! Seems like rollback to 1.2.1 might be solution for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants