-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
请问Dva为什么所有的代码全部都到了 index.js 文件?有分块打包 demo 吗? #427
Comments
我看了一下,这个打包是到同一个文件,并没有分离开来? |
不是按需加载,是分块打包... |
一个 entry 里要拆包,可以试试 CommonsChunkPlugin 。 |
我写过的 Vue 的项目,Vue 的项目是这样实现的: |
这不就是按需加载吗? |
不是,它也实现了分块打包,比如我系统上有二个路由:a,b; |
https://github.com/dvajs/dva/blob/master/examples/dynamic-load/router.js#L6-L27 |
我有看到这个动态的路由的代码,但是并没有实现 vue 项目中的想过,我现在的代码是这样的 const Main = c => require.ensure([], require => ( function interceptPermissions() { return |
mark |
2 similar comments
mark |
mark |
https://github.com/dvajs/dva/tree/master/examples/dynamic-load |
mark |
@AlaiNiGuests 你地址里的文档,我看了一下,应该已经不能在dva 2.x以上使用了吧? |
mark |
楼主是怎么解决的? 能贴下代码吗? 万分感谢! |
请问Dva为什么所有的代码全部都到了 index.js 文件?有分块打包 demo 吗?
The text was updated successfully, but these errors were encountered: