Skip to content
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

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

Open
liady opened this issue Oct 7, 2024 · 0 comments
Open

Comments

@liady
Copy link
Contributor

liady commented Oct 7, 2024

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 liady added the Tech Debt label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant