-
Notifications
You must be signed in to change notification settings - Fork 1k
fix(vite-plugin-cloudflare): track server restart in module scope #10899
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
Conversation
🦋 Changeset detectedLatest commit: 9af7c62 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
1be2ffe
to
e8ce041
Compare
I see a lot of CI failures. I think this is expected as I seem to remember that it was important that this variable was confined to the scope of the plugin for scenarios (e.g. testing) where the plugin was recreated in-process. Can you describe how the error is actually occuring? |
It works fine if you run the new react router playground directly. The CI error is mainly caused by how we start a vite server manually instead of using the React Router CLI. Let's discuss a bit more next week 👍🏼 |
78e13f4
to
3c61f13
Compare
3c61f13
to
eed47a8
Compare
|
||
fix: track server restart in module scope | ||
|
||
When using `@cloudflare/vite-plugin` with React Router, miniflare might be disposed during restart. This change makes sure to track when the dev server restart in module scope to avoid unexpected behavior. |
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.
When using `@cloudflare/vite-plugin` with React Router, miniflare might be disposed during restart. This change makes sure to track when the dev server restart in module scope to avoid unexpected behavior. | |
When using `@cloudflare/vite-plugin` with React Router, miniflare might be disposed during restart. This change makes sure to track when the dev server restarts in the module scope to avoid unexpected behavior. |
Fixes #10404.
Closes #10841.
This fixes an issue using the cloudflare vite plugin with React Router which shows
Internal server error: Miniflare not defined
when you update the wrangler config.