Skip to content
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

feat!: add Vite 6 Environment API support #786

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

userquin
Copy link
Member

@userquin userquin commented Nov 15, 2024

Description

2024-11-15: this PR only tested with VanillaJS/TypeScript via test:vite-ecosystem-ci script, rn cannot be tested with lib frameworks, Vite ecosystem-ci is failing for vue and svelte (preparing external tests for react).

Tested with:

  • VanillaJS/Typescript app with Vite 3, 4, 5 and 6 including on the fly PWA Assets HMR.
  • Svelte Vite plugin (Svelte 5.1.7 and 5.2.0, Svelte Vite plugin 4.0.1):
    • Svelte 5 + Vite 5: working with this PR
    • Svelte 5 + Vite 6: working (we need to add resolve.conditions: ['browser']) Vite or Svelte plugin resolving Svelte from index-server.js instead index-client.js
  • React Vite plugin: tested with Vite 5 and 6 (via pnpm create vite > React TS + adding pwa stuff from pnpm create @vite-pwa/pwa > React TS)
  • Vue Vite plugin (5.2.0): tested with Vite 5 and 6 (via pnpm create vite > Vue TS + adding pwa stuff from pnpm create @vite-pwa/pwa > Vue TS)

Linked Issues

Additional Context

fix #798


Tip

The author of this PR can publish a preview release by commenting /publish below.
/publish

Copy link

netlify bot commented Nov 15, 2024

Deploy Preview for vite-plugin-pwa-legacy ready!

Name Link
🔨 Latest commit 88b2e45
🔍 Latest deploy log https://app.netlify.com/sites/vite-plugin-pwa-legacy/deploys/6749ff715c76090008de7308
😎 Deploy Preview https://deploy-preview-786--vite-plugin-pwa-legacy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@userquin
Copy link
Member Author

/publish

Copy link

pkg-pr-new bot commented Nov 15, 2024

npm i https://pkg.pr.new/vite-plugin-pwa@786

commit: 88b2e45

@userquin userquin added the do NOT merge yet Do not merge this PR into the target branch yet label Nov 15, 2024
@userquin userquin requested a review from antfu November 29, 2024 16:35
This was referenced Nov 29, 2024
@userquin userquin changed the title feat!: add Vite 6 support feat!: add Vite 6 Environment API support Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cr-tracked do NOT merge yet Do not merge this PR into the target branch yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Letting vite create a manifest.json with the VitePWA plugin enabled will cause vite build to fail
1 participant