utopia icon indicating copy to clipboard operation
utopia copied to clipboard

Move Vite's asset resolution fallback logic to the module resolution phase

Open liady opened this issue 1 year ago • 0 comments

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:

  1. 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.
  2. Tweak the behavior so that /public/asset.png will be searched before /asset.png (and not as a fallback)

liady avatar Oct 07 '24 13:10 liady