Skip to content

feat!: update templates to use Vite 7 and latest framework changes - #36

Merged
userquin merged 8 commits into
mainfrom
userquin/feat-update-vite-pwa-1.1.0
Oct 15, 2025
Merged

userquin merged 8 commits into
mainfrom
userquin/feat-update-vite-pwa-1.1.0

Conversation

@userquin

@userquin userquin commented Oct 13, 2025 •

Copy link
Copy Markdown
Member

Description

This PR includes the following changes in the templates:

  • update all templates using templates at Vite
  • update pwa plugin to 1.1.0
  • update pwa sveltekit to 1.0.1
  • update pwa nuxt to 1.0.6
  • update pwa assets to 1.0.2
  • update nuxt template to use nuxt v4 template create-nuxt@latest

This PR also includes the following changes in the package:

  • update eslint stuff to latest versions
  • update TS to ~5.9.3
  • update ni to 26.1.0
  • remove nuxt v3 and v4-compat templates logic, now v4 only (will require a cleanup later)

Linked Issues

closes #34

Additional Context


Tip

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

@userquin
userquin marked this pull request as ready for review October 14, 2025 14:36
@pkg-pr-new

pkg-pr-new Bot commented Oct 14, 2025 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/@vite-pwa/create-pwa@36

commit: d392bcd

@userquin
userquin requested a review from Copilot October 15, 2025 17:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Upgrade templates to Vite 7 and align frameworks, TypeScript, and PWA tooling with latest versions; simplify Nuxt support to v4-only and adjust service worker behavior for Nuxt payloads.

  • Bump Vite, framework, and PWA-related dependencies across templates.
  • Refresh TypeScript configs (libs/targets, verbatimModuleSyntax, types) to match Vite 7 guidance.
  • Migrate ESLint to flat config style; adjust React templates’ ESLint config and READMEs.
  • Nuxt: switch to create-nuxt@latest, drop v3/v4-compat, and add Workbox payload URL handling.

Reviewed Changes

Copilot reviewed 64 out of 66 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
templates/template-vue/src/style.css Remove Inter from font stack; default to system-ui-first.
templates/template-vue/package.json Bump vue and dev tooling (Vite 7, PWA 1.1.0, assets-generator 1.0.2).
templates/template-vue-ts/tsconfig.node.json Target ES2023, add node types, switch to verbatimModuleSyntax, add erasableSyntaxOnly.
templates/template-vue-ts/tsconfig.app.json Add vite/client types, add erasableSyntaxOnly.
templates/template-vue-ts/src/style.css Remove Inter from font stack.
templates/template-vue-ts/package.json Upgrade Vue, TS 5.9, Vite 7, PWA 1.1.0, vue-tsc 3.1, add @types/node.
templates/template-vanilla/src/style.css Remove Inter from font stack.
templates/template-vanilla/package.json Upgrade to Vite 7, PWA 1.1.0, assets-generator 1.0.2.
templates/template-vanilla-ts/tsconfig.json Target/lib ES2022, verbatimModuleSyntax, vite/client types, add erasableSyntaxOnly.
templates/template-vanilla-ts/src/style.css Remove Inter from font stack.
templates/template-vanilla-ts/package.json Upgrade TS 5.9, Vite 7, PWA 1.1.0, assets-generator 1.0.2.
templates/template-svelte/svelte.config.js Add SvelteConfig JSDoc type annotation.
templates/template-svelte/src/app.css Remove Inter from font stack.
templates/template-svelte/package.json Upgrade Svelte 5.39, Vite 7, PWA 1.1.0, assets-generator 1.0.2.
templates/template-svelte/jsconfig.json Add vite/client types.
templates/template-svelte/README.md Remove note about global.d.ts vs compilerOptions.types.
templates/template-svelte-ts/tsconfig.node.json Target ES2023, add node types, verbatimModuleSyntax, add erasableSyntaxOnly.
templates/template-svelte-ts/tsconfig.app.json Add tsBuildInfo, target ES2022, add svelte and vite/client types, noEmit, remove isolatedModules.
templates/template-svelte-ts/svelte.config.js Add SvelteConfig JSDoc type annotation.
templates/template-svelte-ts/src/app.css Remove Inter from font stack.
templates/template-svelte-ts/package.json Upgrade Svelte, TS 5.9, Vite 7, PWA 1.1.0; add @types/node.
templates/template-solid/src/index.css Remove Inter from font stack.
templates/template-solid/package.json Upgrade solid-js and dev tooling (Vite 7, PWA 1.1.0).
templates/template-solid-ts/tsconfig.node.json Target ES2023, add node types, verbatimModuleSyntax, add erasableSyntaxOnly.
templates/template-solid-ts/tsconfig.app.json Target/lib ES2022, vite/client types, verbatimModuleSyntax, add erasableSyntaxOnly.
templates/template-solid-ts/src/index.css Remove Inter from font stack.
templates/template-solid-ts/package.json Upgrade TS 5.9, Vite 7, PWA 1.1.0; add @types/node.
templates/template-react/src/index.css Remove Inter from font stack.
templates/template-react/package.json Upgrade React 19.2, Vite 7, ESLint 9.37, assets-generator 1.0.2, PWA 1.1.0.
templates/template-react/eslint.config.js Migrate to ESLint flat config with defineConfig/globalIgnores; adjust rules.
templates/template-react/README.md Update plugin links, add React Compiler note, lint guidance.
templates/template-react-ts/tsconfig.node.json Target ES2023, add node types, verbatimModuleSyntax, add erasableSyntaxOnly.
templates/template-react-ts/tsconfig.app.json Target/lib ES2022, vite/client types, verbatimModuleSyntax, add erasableSyntaxOnly.
templates/template-react-ts/src/index.css Remove Inter from font stack.
templates/template-react-ts/package.json Upgrade React 19.2, TS 5.9, Vite 7, ESLint 9.37, typescript-eslint 8.45; add @types/node.
templates/template-react-ts/eslint.config.js Migrate to ESLint flat config with defineConfig/globalIgnores.
templates/template-react-ts/README.md Update plugin links, add React Compiler note, and expanded ESLint config guidance.
templates/template-qwik/src/index.css Remove Inter from font stack.
templates/template-qwik/package.json Upgrade Qwik 1.16, Vite 7, serve 14.2.5.
templates/template-qwik/README.md Clarify “Client-Side Rendering” wording.
templates/template-qwik-ts/tsconfig.node.json Target ES2023, add node types, verbatimModuleSyntax, add erasableSyntaxOnly.
templates/template-qwik-ts/tsconfig.app.json Target/lib ES2022, vite/client types, verbatimModuleSyntax, add erasableSyntaxOnly.
templates/template-qwik-ts/src/index.css Remove Inter from font stack.
templates/template-qwik-ts/package.json Upgrade Qwik 1.16, TS 5.9, Vite 7; add @types/node; upgrade serve.
templates/template-qwik-ts/README.md Clarify “Client-Side Rendering” wording.
templates/template-preact/src/index.css Remove Inter from font stack.
templates/template-preact/package.json Upgrade Preact 10.27, Vite 7, PWA 1.1.0, preset-vite 2.10.2.
templates/template-preact-ts/tsconfig.node.json Target ES2023, add node types, verbatimModuleSyntax, add erasableSyntaxOnly.
templates/template-preact-ts/tsconfig.app.json Target/lib ES2022, vite/client types, verbatimModuleSyntax, add erasableSyntaxOnly.
templates/template-preact-ts/src/index.css Remove Inter from font stack.
templates/template-preact-ts/package.json Upgrade Preact, TS 5.9, Vite 7, PWA 1.1.0.
templates/template-lit/src/index.css Remove Inter from font stack.
templates/template-lit/package.json Upgrade lit 3.3, Vite 7, PWA 1.1.0, assets-generator 1.0.2.
templates/template-lit-ts/tsconfig.json Target/lib ES2022, vite/client types, verbatimModuleSyntax, add erasableSyntaxOnly.
templates/template-lit-ts/src/index.css Remove Inter from font stack.
templates/template-lit-ts/package.json Upgrade lit, TS 5.9, Vite 7, PWA 1.1.0.
templates/template-custom-nuxt/service-worker/prompt-sw.ts Add Workbox urlManipulation to normalize Nuxt _payload.json requests.
templates/template-custom-nuxt/service-worker/claims-sw.ts Same as above for claims SW variant.
src/versions.ts Bump internal version constants to latest (PWA 1.1, assets 1.0.2, Nuxt/SvelteKit, TS 5.9, sharp).
src/types.ts Narrow FrameworkVariantKey to v4 Nuxt (comment out v4-compat key).
src/prompts.ts Add Nuxt v4 entry using create-nuxt@latest; comment legacy templates.
src/customize/nuxt.ts Enable Workbox payload query param handling; drop v4-compat future flag blocks.
src/customize/index.ts Route custom-nuxt to v4-only customize path.
package.json Update repo devDependencies (ESLint 9.37, TS 5.9, @antfu/ni 26.1, etc.).

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +8 to +23
export default defineConfig([
globalIgnores(['dist']),
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs['recommended-latest'],
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
)
])

Copilot AI Oct 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flat config doesn't support 'extends' inside an override. As written, none of the recommended configs are applied. Include each shared config as its own element in the config array (optionally adding files patterns to scope them) before your override.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhmmm, this is the configuration used at Vite react-ts template

Comment on lines +19 to +43
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...

// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,

// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
})
])

Copilot AI Oct 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example uses 'extends' in an ESLint flat config override, which is ignored. Update the docs to show adding these configs as separate entries in the exported array (optionally scoped with files) so readers get working examples.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extends was added back to the flat config

@userquin
userquin merged commit affee75 into main Oct 15, 2025
2 checks passed
@userquin
userquin deleted the userquin/feat-update-vite-pwa-1.1.0 branch October 15, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bump vite-pwa version to v1

2 participants