antd design 直接引用的话体积较大,不压缩4M
可以通过 babel-plugin-import,实现按需加载,仅仅会加载用到的组件的js 和css
demo
{
test: /\.jsx$/, loader: "babel",
query: {
presets: ['es2015', 'react'],
"plugins": [["import", { "libraryName": "antd", "style": true } ]]
}
}