-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
Config code split #562
Config code split #562
Conversation
这个插件简直完美。。我去膜拜一下 |
const dynamicWrapper = (app, models, component) => { | ||
// () => require('module') | ||
// transformed by babel-plugin-dynamic-import-node-sync | ||
if (component.toString().indexOf('.then(') < 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个判断的意义是什么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
区别是 () => import('module')
还是转换过的 () => require('module')
。目前没有找到更好的方案。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
希望webpack未来出一个api,实现的感觉还是打补丁的感觉
|
你为什么能通过ci检查? |
40e95db
to
bb2b78c
Compare
bb2b78c
to
717513b
Compare
Use https://github.com/seeden/babel-plugin-dynamic-import-node-sync
Defaultly, app would be bundled as one file.
The code split will works if you remove
dynamic-import-node-sync
in.roadhogrc
.close #470
close #524