utopia
utopia copied to clipboard
Move Vite's asset resolution fallback logic to the module resolution phase
Vite handles public assets required from '/asset.png' by looking for them in public folder as well as the root path.
Our current implementation falls back when not finding the asset in the root path, and yields for the framework to provide a fallback path:
https://github.com/concrete-utopia/utopia/pull/6420/files#diff-a48ec59247957af2197227e3d2c2c2e5156fd31589c4981df5828ca15ac9db5bR187-R196
After the Node Resolution PR (#6425) is merged, we need to:
- Move this logic to the lower-level module resolution phase (
module-resolution.ts) instead of the higher-level (package-manager) phase that it's in now. - Tweak the behavior so that
/public/asset.pngwill be searched before/asset.png(and not as a fallback)