Conversation
|
|
There was a problem hiding this comment.
This file is largely a copy of the other test files.
|
/ecosystem-ci run |
|
Should we have a internal |
|
📝 Ran ecosystem CI on
✅ histoire, ladle, laravel, marko, previewjs, quasar, qwik, rakkas, remix, unocss, vite-plugin-pwa, vite-plugin-react, vite-plugin-react-swc, vite-plugin-svelte, vite-plugin-vue, vite-setup-catalogue, vitepress |
|
/ecosystem-ci run analogjs |
|
📝 Ran ecosystem CI on
✅ |
I was wondering that in the PR description too. I think I can refactor to that if we think it's cleaner. Also, looks like I need to investigate the analog fail (or seems like they recently merged something) |
|
When running the playground, I'm seeing two $ pnpm -C playground/assets dev:encoded-base
...
VITE v5.3.5 ready in 94 ms
➜ Local: http://localhost:9524/foo%20bar/
➜ Network: use --host to expose
➜ press h + enter to show help
6:46:19 PM [vite] Pre-transform error: No matching HTML proxy module found from /foo bar/index.html?html-proxy&index=4.js
6:46:19 PM [vite] Pre-transform error: Failed to load url /foo bar/asset/main.js (resolved id: /foo bar/asset/main.js). Does the file exist? |
|
I just pushed a fix to handle them. Looks like we were passing urls with decoded base, and then trying to strip with an encoded base, causing I'm not particularly happy with my fix as encoded and decoded urls/base are slightly more intertwined, but I think it's probably sufficient for now. |
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI on
✅ analogjs, histoire, ladle, laravel, marko, previewjs, quasar, rakkas, remix, sveltekit, unocss, vite-plugin-pwa, vite-plugin-react, vite-plugin-react-swc, vite-plugin-svelte, vite-plugin-vue, vite-setup-catalogue, vitepress |
Description
supersedes and closes #16412
Due to the changes from #15311 (and tweaks thereafter) (Vite 5.2), I believe it broke most cases of
basethat contains encoded base paths, e.g./foo%20bar/, which Vite encodes internally even if you pass/foo bar/.I'm somewhat relieved that we didn't get a lot of reports of this, because
basepaths that look like this are hard 🥲Because
resolvedConfig.baseis a URL-encoded string, when we merge it with some un-encoded strings, and encode the merged string, thebaseportion will get double encoded. The solution in this PR is to decode thebasefirst.In the future, maybe we can revisit if we want to have
resolvedConfig.basebe decoded only, or introduce a newresolvedConfig.decodedBase? Or we can say we don't support strange base paths.NOTE: I also updated the code in
plugin-legacytogether as I noticed it while searching the codebase.