-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
feat!: support file://
resolution
#18422
Conversation
/ecosystem-ci run |
This comment was marked as outdated.
This comment was marked as outdated.
📝 Ran ecosystem CI on
✅ analogjs, histoire, ladle, laravel, marko, nuxt, previewjs, quasar, qwik, rakkas, redwoodjs, storybook, unocss, vite-plugin-pwa, vite-plugin-react, vite-plugin-react-swc, vite-plugin-vue, vite-setup-catalogue, vitepress, vuepress |
file://
resolve for server consumer (clean branch)file://
resolve
file://
resolvefile://
resolution
I'm for supporting fileURLs in both client and SSR dev/build.
To clarify this part, I wrote down a support matrix.
|
Thanks for the summary! I didn't know the last two are possible on Windows. It looks like most of us agree with supporting this everywhere, so I'll go ahead removing ssr check and try adding tests for client dev/build. |
file://
resolutionfile://
resolution
/ecosystem-ci run |
📝 Ran ecosystem CI on
✅ analogjs, histoire, ladle, laravel, marko, previewjs, quasar, qwik, rakkas, storybook, unocss, vite-environment-examples, vite-plugin-pwa, vite-plugin-react, vite-plugin-react-swc, vite-plugin-vue, vite-setup-catalogue, vitepress, vuepress |
file://
resolutionfile://
resolution
I removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Doesn't it have a similar effect as #17369 (comment)? Users will need |
That's true. Yeah, let's add it back and add this PR to https://github.com/vitejs/vite/blob/main/docs/guide/migration.md#advanced. |
file://
resolutionfile://
resolution
Description
Copying #18421 on top of main since its base branch #18361 is concerned with a different aspect of runner implementation.
The rational of supporting
file://
is briefly mentioned here #18361 (comment). I think the current situation is:import "file://...
import "/abs-path.js"
on Unix, but for Windows,import "C:/abs-path.js"
fails./@fs
can be used to workaround.import "file://...
works.resolveId
to resolvefile://
.And the necessary decision is probably a one of
file://
support from Vite 6 module runner (this is partly done in PR 18361)file://
for ssr dev/build (this PR)file://
for both client and ssr dev/build