feat: Cloudflare Vite plugin integration#15627
Conversation
This reverts commit eaffa39.
🦋 Changeset detectedLatest commit: 30d1cda 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 |
|
so i tried on wsl ubuntu with node 22, got the same error when doing build with and without extra patches ray mentioned idk what is wrong, maybe i have circular deps or something weird which caued this, but it works without this new adapter on windows. |
I'd recommend creating a new issue to discuss this as this behaviour has existed before this PR. |
|
This message was written with the help of Cursor, so I would like to apologize on my behalf for not catching obvious mistakes and or idiocy said. It's the first time I'm trying to use pkg.pr.new, and I'm not familiar with it, so I'm not so sure everything I've done makes sense. Plus, I'm definitely not expert in implementation of the adapter system of SvelteKit, but I really enjoy deploying my apps on Cloudflare, and these fixes would help A LOT all my projects as I (think I) extensively use the Vite Environment API via wrangler/vite dev to bind multiple local cloudflare services via Cloudflare Env (or in this case SvelteKit's platform.env). That said, I think I've found the same bug as above, but on macOS, and I do not understand if I'm making obvious mistakes in using new tech I'm not too aware of, or if there are bugs. Start of the AI aided message I am testing the Cloudflare Vite plugin integration branch: Relevant
|
|
In response to my previous message, by cloning this PR branch, a fix was the following (again, not entirely sure is the correct long term fix, but it fixes the symptoms): Adapter:
|
|
Thanks @Giggiux let me try to add a test for this and also tighten up that importer check |
|
Do we have any timeline on this one? |
|
The team is currently focusing on Svelte async bugs, regressions, security fixes, and remote functions. Even if this were merged, it would have to wait until the whole of SvelteKit 3 is ready before release |
| await expect(page.locator('#var')).toHaveText(`Var: ${prod_string}VAR`); | ||
| }); | ||
|
|
||
| test('serves static assets with assets path prefix', async ({ page, request }) => { |
There was a problem hiding this comment.
Not really sure how to get this test passing in the Cloudflare environment. Vite doesn't enforce consumers to allow us to run arbitrary code during preview so an alternative might be to have process.env.SVELTEKIT_ASSETS as an override which we set before anything else starts?
closes #10496
closes #13692
closes #1712
closes #2963
closes #13300
closes #1519
This PR removes support for Cloudflare Pages and integrates with the Cloudflare Vite plugin. Users can now:
TODOs
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