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

feat: use a single transport for fetchModule and HMR support #18362

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Oct 16, 2024

Description

so that env providers not need to implement both fetchModule transport and HMR transport.

I think this PR still needs to polish the naming and probably better to introduce a interface that wraps HotChannel so that env providers does not need to care about internal conversion that is done for send and invoke (done).

image
The upper part is how it was before and the lower part is how it is after.

@sapphi-red sapphi-red added the feat: environment API Vite Environment API label Oct 16, 2024
Copy link

stackblitz bot commented Oct 16, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sapphi-red
Copy link
Member Author

sapphi-red commented Oct 17, 2024

I polished the interface so that it's more easier to implement for the env providers. I think we need a better name and check if this is not breaking a code that was working in 5.x.

@sheremet-va
Copy link
Member

@bluwy pointed out the inconsistency in the naming of RunnerTransport in #16358 (comment)

Should we also standardise it here?

@sapphi-red

This comment was marked as outdated.

@vite-ecosystem-ci

This comment was marked as outdated.

@sapphi-red
Copy link
Member Author

/ecosystem-ci run

@vite-ecosystem-ci
Copy link

📝 Ran ecosystem CI on 38b50bf: Open

suite result latest scheduled
astro failure failure
remix failure failure
sveltekit failure failure
vike failure failure
vite-environment-examples failure success
vitest failure failure

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-svelte, vite-plugin-vue, vite-setup-catalogue, vitepress, vuepress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: environment API Vite Environment API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants