Replies: 1 comment
-
|
I think the time cost is necessary because Vite doesn't know your previous output or what changes you made. Even if it did know your output, it might still need to compare the differences between the previous output and the current files, which is obviously more difficult to implement and requires more time;. it's better to recompile from scratch. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When I run
vite build, it is doing a lot of processing when almost nothing has changed. e.g. I have 100 entrypoint files, each with different imports (some shared, some unique). Regardless of whether I change a shared import or just the entrypoint file, or even if I change nothing, everything is being rebuilt duringvite build(the mtime changes on all the files).If I run
vite buildtwice in a row with no changes in between, both builds take the same time and all files get an updated mtime. There appears to be a lack of caching between builds, even though I havecache: truein my config. This is important because I have a lot of node_modules that don't change between builds, yet need to rebuilt each time :-(I thought maybe caching was invalidated because of using functions for assetFileNames, chunkFileNames, and entryFileNames, but replacing them with strings didn't help either.
This isn't an issue on my local machine (Apple M4 Pro, 24GB).
vite buildtakes about 15s. But on production servers (Intel, 2vCPU, 4GB), it takes upwards of 5 minutes...Is this expected? Does vite always recalculate everything we no build caching? Or might something be wrong in my setup/config?
Beta Was this translation helpful? Give feedback.
All reactions