babel-plugin-import
babel-plugin-import copied to clipboard
this plugin will duplicate import modularly, at last the size is huge too.
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"
}
]
]
}
}`
after upgrade babel-plugin-import
from 1.2.1 to 1.6.2
the output:
the number of reference is equal to the times of Col
used in the compoent
@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
@osadchiynikita sorry ,I have not solve the problem.
@yunxifd thanks for answer! Seems like rollback to 1.2.1 might be solution for now