vite-plugin: update to use the new @cloudflare/unenv-preset#7830
vite-plugin: update to use the new @cloudflare/unenv-preset#7830
@cloudflare/unenv-preset#7830Conversation
🦋 Changeset detectedLatest commit: 6299a9222ecd4bbeaba1ec1c2ca0f7b33247c8fc 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 |
|
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-wrangler-7830You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7830/npm-package-wrangler-7830Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-wrangler-7830 dev path/to/script.jsAdditional artifacts:cloudflare-workers-bindings-extension: wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-cloudflare-workers-bindings-extension-7830 -O ./cloudflare-workers-bindings-extension.0.0.0-vc4fc52576.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vc4fc52576.vsixcreate-cloudflare: npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-create-cloudflare-7830 --no-auto-update@cloudflare/kv-asset-handler: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-cloudflare-kv-asset-handler-7830miniflare: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-miniflare-7830@cloudflare/pages-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-cloudflare-pages-shared-7830@cloudflare/unenv-preset: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-cloudflare-unenv-preset-7830@cloudflare/vite-plugin: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-cloudflare-vite-plugin-7830@cloudflare/vitest-pool-workers: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-cloudflare-vitest-pool-workers-7830@cloudflare/workers-editor-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-cloudflare-workers-editor-shared-7830@cloudflare/workers-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-cloudflare-workers-shared-7830@cloudflare/workflows-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13264468734/npm-package-cloudflare-workflows-shared-7830Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
169c800 to
a2cd688
Compare
There was a problem hiding this comment.
- Not sure if this should be "1.1.1" (no
~)? We can relax the range once 2.0 is released - Is it expected that the plugin has no (peer) dep on
workerd?
There was a problem hiding this comment.
wrangler is in both devDep and peerDep, as is Vite
There was a problem hiding this comment.
Wrangler is there twice because the devDep is only for testing (and we use the workspace version); while the peerDep is a range ("wrangler": "^3.101.0") which constrains the minimum version.
There was a problem hiding this comment.
Happy to pin this dep to 1.1.1 if that helps.
There was a problem hiding this comment.
the cf unenv preset has its own peer dependency on workerd.
There was a problem hiding this comment.
Happy to pin this dep to 1.1.1 if that helps
It's more that we do not expect any 1.1.2...
the cf unenv preset has its own peer dependency on workerd.
it's a peer dep so it should be installed somewhere...
There was a problem hiding this comment.
It'll be installed as part of Wrangler
vicb
left a comment
There was a problem hiding this comment.
I only took a quick look.
How urgent is this? If this can be put on hold until we release the v2 of the preset, that would be ideal
The Vite plugin is currently broken with Vite 6.1 and this solves that. If we want to hold off on landing this then I would have to put up a fix for the old unenv usage. Is there a reason to hold this back? This Vite plugin is, itself, in beta, so it feels like a good place to try out new stuff like the Cloudflare unenv update. |
85717f6 to
5e2abeb
Compare
I'm asking mostly because I don't have time to do a deep review. There might be changes to do after #7915 is merged / 2.0 is released |
vicb
left a comment
There was a problem hiding this comment.
No time for a deep review right now.
But @petebacondarwin mentioned it fixes issues and the plugin is still in beta.
I can look at it more closely after v2.0 of the preset is released
jamesopstad
left a comment
There was a problem hiding this comment.
Looks good, as far as I understand the new preset. I would prefer the plugins to be defined in the same file though so that they have access to the cloudflare function scope.
5e2abeb to
9291388
Compare
jamesopstad
left a comment
There was a problem hiding this comment.
Looks good! I think there's still a bit of an open question about what's correct for preview mode but happy for you to make the decision on this.
e931930 to
6299a92
Compare
…de.js compat module
6299a92 to
b46a906
Compare
Fixes #8054