easy-team / egg-vue-webpack-boilerplate

Egg Vue Server Side Render (SSR) / Client Side Render (CSR)
https://easyjs.cn/egg-vue
MIT License
1.36k stars 248 forks source link

how to import ant-design-vue Only import the components you need #101

Closed sixinyiyu closed 6 years ago

sixinyiyu commented 6 years ago

the components does not effective。

"plugins": [ "transform-object-rest-spread", "syntax-dynamic-import", "transform-object-assign", "transform-runtime", ["import", { "libraryName": "ant-design-vue", "style": "css" }, "ant-design-vue" ]

page/index/index.vue import Vue from 'vue'; import { Row, Col, Layout, Breadcrumb } from 'ant-design-vue'; Vue.use(Layout);

hubcarl commented 6 years ago

@sixinyiyu 参考这个配置试试 https://github.com/easy-team/egg-react-webpack-boilerplate/issues/11https://www.yuque.com/easy-team/egg-react/babel

例子: https://github.com/easy-team/egg-react-webpack-boilerplate/tree/antd-theme