Repository navigation
feat!: update templates to use Vite 7 and latest framework changes - #36
Conversation
commit: |
There was a problem hiding this comment.
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.
| 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 }, | ||
| ], | ||
| }, | ||
| }, | ||
| ) | ||
| ]) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
uhmmm, this is the configuration used at Vite react-ts template
| 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... | ||
| }, | ||
| }, | ||
| }) | ||
| ]) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
extends was added back to the flat config
Description
This PR includes the following changes in the templates:
create-nuxt@latestThis PR also includes the following changes in the package:
nito 26.1.0Linked Issues
closes #34
Additional Context
Tip
The author of this PR can publish a preview release by commenting
/publishbelow.