VueJs + Webpack lazyload modules from ElementUI
问题 I would like to lazy-load a specific element of ElementUI in a Vue component. I tried this: import { Tree } from /* webpackChunkName : "element-ui" */ 'element-ui'; Vue.component(Tree.name, Tree); Vue.use(Tree); And this: { components: { 'el-tree': () => import(/* webpackChunkName : "element-ui" */ "element-ui").then(({Tree}) => Tree) } } But in both cases, the element-ui.js chunk file is not created, and the full library is inserted into the main.js file instead. How do I dynamically import