Conversation
|
|
|
You probably need to bump the peer dep version on Vite |
Thanks! I missed that. Bumped it to 7 because I think 6 is missing some Environment API behaviour around multiple plugins building the app |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
|
Sorry this got paused for such a long time. Took a little time off from this since we were getting remote functions out, then I had some non-SvelteKit work too. I left a bunch of TODOs in the code which should be enough to get started but I imagine resolving the merge conflicts since remote functions were merged would be step 1. The major goals are in the TODO list from the post at the top of the thread (get it working in cloudflare dev / vite dev). Hopefully I return to this this month if not next. |
|
I am currently bypassing this issue using the approach defined in this repository, using alchemy.dev. But it adds a bunch of extra dependencies, it requires creating a new Worker script with the Durable Objects that after deployment is attached as a binding to the SvelteKit workers, and most importantly requires an "hack" in dev to send the requests via fetch to the secondary workers dev server, instead of using bindings. Adding support for the official cloudflare vite plugin, and for websockets would make development with Cloudflare as a target even better with SvelteKit! |
This comment was marked as duplicate.
This comment was marked as duplicate.
|
Hey @teemingc is there any way we can help in moving this PR forward? |
This comment was marked as off-topic.
This comment was marked as off-topic.
- Upgrade to Vite 7.0.3 and add pnpm override to ensure consistent versions - Add sveltekit_vite_environment virtual module for dev-time manifest access - Add DevEnvironment type for sharing state between plugin and dev server - Add environment.js utilities for module resolution in Vite environments - Update dev server to populate and invalidate environment module - Support environments config for future isolated builds This is a minimal port of the Environment API changes from PR sveltejs#14008, enabling Vite 7 support while maintaining compatibility with existing adapters.
|
Closing this because we'll be starting this from scratch next week |
|
Is there a new PR for it? |
| ] | ||
| ], | ||
| "overrides": { | ||
| "esm-env": "github:benmccann/esm-env#bcbddbc&path:packages/esm-env" |
There was a problem hiding this comment.
just curious, is there a reason you had to do this? is there anything you need me to fix in it?
This I think: #15627 |
closes #13692
closes #1712
part of #3535
closes #13739
closes #13357
closes #12637
w.i.p and still has a lot of problems to solve. Needed to open this PR to test installing this from pkg.pr.new since linking locally with pnpm symlinks to the local kit repo. Then, when we try importing kit code from inside an environment, it results in a path which doesn't exist such as
/packages/kit/.... Instead, it should probably import fromnode_modules/@sveltejs/kit/....This PR adopts the Vite Environment API in
kitand changesadapter-cloudflareto use a similar approach to Remix where the user can specify their ownworker.jsfile. Otherwise, we can generate the wrangler config and worker for them. This approach integrates well withvite-plugin-cloudflareand provides users with direct access to the worker script, allowing them to export Durable Objects and add additional handlers.Thanks to @jamesopstad for #12637 and writing up the Google Doc explaining the Remix and vite-plugin-cloudflare integration. Resources include:
TODO
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