Repository navigation
Conversation
…ite-plugin` Applies the Worker environment config generated by `@cloudflare/vite-plugin` to the SSR build so that dependencies are bundled with the workerd export conditions and CommonJS `require` calls of Node builtins become imports instead of `createRequire(import.meta.url)`, which crashes in workerd. closes #15960 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/cc99ea2a8c6994c5b921b1f67111701cb6ecd059Open in |
🦋 Changeset detectedLatest commit: cc99ea2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@cloudflare/vite-plugin@cloudflare/vite-plugin
teemingc
commented
Oct 21, 2026
| "$schema": "../node_modules/wrangler/config-schema.json", | ||
| "main": "../dist/index.js", | ||
| "compatibility_date": "2026-06-24", | ||
| "compatibility_date": "2026-09-01", |
Member
Author
There was a problem hiding this comment.
The workers test app now uses a compatibility date after 2026-08-04, from which nodejs_compat is enabled by default.
teemingc
commented
Oct 21, 2026
| }; | ||
| } | ||
|
|
||
| // TODO: move the Vite plugins into their own file |
Member
Author
There was a problem hiding this comment.
do this later so that the diff in this PR isn't unreadable
teemingc
commented
Oct 21, 2026
| "@sveltejs/kit": "^3.0.0-next.0", | ||
| "wrangler": "^4.118.0" | ||
| "vite": "^8.0.12", | ||
| "wrangler": "^4.151.0" |
Member
Author
There was a problem hiding this comment.
Bumps the wrangler peer dependency to ^4.151.0 to match the Cloudflare Vite plugin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teemingc
marked this pull request as ready for review
October 21, 2026 09:25
…ctory Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ectory Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teemingc
commented
Oct 22, 2026
4 of 6 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #15960
This PR aims to align more closely to a
workerddeployment by applying the same environment config that@cloudflare/vite-pluginuses. As a result:workerd/workerexport conditionsplatform: 'neutral', and Node builtins required from CommonJS become ESM imports (through the plugin'snodejs_compathandling), resolving to the same polyfillsworkerdusesOne question: would it be safer to label this as a breaking change?
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits