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
Scope of experiments #1
Comments
The prebundle vite plugin seems to do the same thing as farm, and I think you can refer to farm's Partial Bundling strategy. |
Thanks @antfu ! |
I had a quick look. First thanks again @antfu for putting this together and spending your time based on a simple feedback at a meetup, it's really appreciated. The situation I'm in is the following:
I understand this implies some complexity since dir1/featureA may import dir4/foo.js which was also imported by dir3/bar.js and which should really prevent duplication as it can create some strange runtime weirdness with object comparaisons for example. If an initial pass is needed to determine which modules are indirectly referenced by the "working folder" like dir1/featureA to build some kind of mapping, that's totally fine as people tend to work on a given part of the codebase for a while and this doesn't change often. Also, even if it does happen to update a file outside of my working folder, it's fine to do a full reload as this is super rare. I don't have deep knowledge on the internals of vite, so I may have been inaccurate, sorry if that's the case. In the playground example, if I understood correctly, as soon as submodule2 references submodule1/something, it duplicates the module content which could be an issue (not really because of the size, but more about the correctness). Thanks a lot for the followup! |
Hi @speray, if you didn't get it wrong, you were talking with me about the bottleneck of Vite's network request in Strasbourg (sorry if I made a mistake).
We, the Vite team, want to explore this direction a bit, as we consider it quite a common issue in Vite. This repo is a very basic PoC I made in 15mins, but it seems to work in general. It would be great to have some feedback on different usage/needs when working with large-scale apps.
(thanks to @edimitchel for the info!)
The text was updated successfully, but these errors were encountered: