-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
fix: optimizeDeps.entries default ignore paths #7469
fix: optimizeDeps.entries default ignore paths #7469
Conversation
We can easily add the default story into |
Yes, this is what I'm thinking too. I'll try to do a PR for this at one point. To really work well I think we should not start the lazy scan until the initial processing for all modules of the app is done, if not we would be consuming resources and hurting the initial load time. We need to check how to start the scan once Vite is idle |
I'm not sure how |
I think it's the combination of a large project and using a custom (JS) esbuild plugin to remove flow types. Without this plugin it finishes much quicker (<10s).
Why does Vite need to do full page reloads anyway? |
When Vite optimizes dependencies it passes all of them to esbuild together, as there could be common parts and interdependencies. This is why you will see chunk-xxxxxxxx.js in About |
Description
Fix #5131
Fix #2599
__tests__
from the ignore list ifoptimizeDeps.entries
is specifiedcoverage
to the ignore list ifoptimizeDeps.entries
is not explicitPing @tajo, @IanVS, @Akryum @edikdeisling, @JessicaSachs
Should we add other common folders? #2599 mentions
cypress-coverage
for example.Additional context
An interesting issue here is that adding a lot of entries to be scanned may have a big impact on cold start, even now that the scanning is non-blocking, we still need to finish it before being able to respond to dependencies requests.
@tajo tried it out in Ladle and got:
@JessicaSachs so for Cypress, you may need to choose between increasing cold start or being able to show something to the user and perform some reloads when finding missing deps.
One option for the future, we could add a new
optimizeDeps.lazyEntries
. The entries marked as lazy will be scanned but not pre-bundled and they will be added once the first missing dependency is found. So at least we only suffer from one full-reload on cold start, keeping the first load fast enough. For cypress, this may not be a good idea since every test may need to run, but for Storybook, Ladle, Historie this may be a good compromise.What is the purpose of this pull request?