-
Notifications
You must be signed in to change notification settings - Fork 192
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
Figure out multiple configs passed to compiler #10
Comments
Update: new solution is to require Ultimately we want to do |
I'll continue working on that tomorrow. Now moving to other things. |
Note for tomorrow: we have to remove Currently progress bars are causing glitches as each compiler tries to override the same bar with its progress. I have it working on my A nice benefit of that addition is that it nicely illustrates serial nature of webpack compiler. |
I don't think there is a option to fix/make workaround for rebuilding iso and android bundle source files changed, since webpack treats it separatly, so ios compiler this that source code has changed for this bundle, and android compiler also. However if we rewrite dev middleware maybe we can implement solution that will lazily build bundle that is requested and watch it, but not build the other one, but if the other one is requested we stop watching the first one, builds the second and watch it or something similar. |
Also, is something blocking us from having 2 parallel builds in separate threads? |
If I understood this correctly, you want to build recursively and async, not all at once? @grabbou |
Yup, @ev1stensberg + first build lazy (on request for entry point). |
I'll see if I can squeeze some time to look into the source code, got a ton of work ahead of me, sadly. Maybe @TheLarkInn has some immediate feedback, but I need to see the source code myself before coming up with a fix. One thing you mentioned was that it builds all configs at once. One thing I've seen is that you can use webpack-merge to generate a config, that could be of use for the async functionality or even switch between |
Just wondering if you had any time to look into this recently. Not a top priority but worth keeping in mind as far as planning goes. |
I've got some time in 2-3 weeks, got a hectic period of exams right now. If ok, can look into it then 👍 |
Sounds good, let me know and I'll be happy to pair on implementing/discussing that |
Just need an email / open DM on Twitter ✌️ |
No longer relevant. |
Currently we create an array of configs, one for each platform. We used to pass that array to webpack compiler, but switched to passing a single one (current platform you are building) for performance reasons.
When Webpack compiler receives an array of configs, it enters multi-config mode and handles them all w/o restarting. That allows us to serve all platform bundles at the same time, just like packager.
Unfortunately, it has a couple of limitations:
All the above makes the development time significantly slower for a very specific use-case (having two simulators open at the same time). However, that use-case is important and we need to support it in a better way.
I'll chat with Webpack team to understand how it works currently, if we are correct and how to fix that. Generally speaking, we might need to write our own dev middleware that does these things.
A solution would be to add a feature to bundle lazily as soon as you request platform bundle. That means we wouldn't bundle android until you load Genymotion and request it. However, as I said above, currently turning on
lazy
option has two issues:ios
,android
also gets builtlazy
is turned on,watch
doesn't work (recompile on file change)Current solution requires passing
--platform
flag.This is very important to sort out now as it's going to be an important workflow detail - whether to pass platform flags or not.
The text was updated successfully, but these errors were encountered: