chore(vite): use different configs for admin and site; don't split assets into chunks #3440
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I didn't want to go down this path necessarily, but:
owid, common, admin
is of dubious value, since there isn't much of an optimization sinceadmin
is used by very few people.This fixes #2904.
It'll also probably speed up pageloads by a tiny bit.
This doesn't change anything about the dev setup, which is still fully served by a single Vite dev server.
For production builds, we produce two types of outputs into two directories,
/assets
and/assets-admin
:These are now entirely self-contained and independent of each other.
This also means that the
owid.mjs
file no longer contains anyimport
statements, which is what fixes #2904.TODOs
embedCharts.js
works/assets-admin
are properly servedyarn buildVite
intoyarn buildViteAdmin
andyarn buildViteSite
/assets-admin
build onowid-cloudflare-prod
: Could save us 45 seconds for each code deploy...ripgrep
through thebakedSite
directory and look forcommon.mjs