{"owner":"vitejs","repo":"vite","hasSkills":true,"totalSkillsCount":16,"totalTokensCount":7674,"categories":["copilot-instructions","anthropic-skill","plugin-manifest","cursor-rule"],"hasMcp":false,"mcpConfig":null,"found":[".github/copilot-instructions.md","docs/plugins/index.md","packages/create-vite/README.md","packages/create-vite/template-qwik-ts/README.md","packages/create-vite/template-qwik/README.md","packages/create-vite/template-react-ts/README.md","packages/create-vite/template-react/README.md","packages/create-vite/template-solid-ts/README.md","packages/create-vite/template-solid/README.md","packages/create-vite/template-svelte-ts/README.md","packages/create-vite/template-svelte/README.md","packages/create-vite/template-vue-ts/README.md","packages/create-vite/template-vue/README.md","packages/plugin-legacy/README.md","packages/vite/README.md",".cursorrules (typescript-nodejs-react-vite-cursorrules-prompt-fi.mdc)"],"skills":{".github/copilot-instructions.md":"This is a TypeScript project that implements a frontend build tooling called Vite. Please follow these guidelines when contributing:\n\n## Code Standards\n\n- Run `pnpm run lint` to ensure that your code adheres to the code standards.\n- Run `pnpm run format` to format your code.\n- Build: `pnpm run build`\n- Test: `pnpm run test` (uses Vitest and Playwright)\n\n## Repository Structure\n\n- `docs/`: Documentation\n- `packages/create-vite`: The source code for the `create-vite` command\n- `packages/plugin-legacy`: The source code for the `@vitejs/plugin-legacy` plugin\n- `packages/vite`: The source code for the Vite core\n- `playground/`: E2E tests\n\n## PR Guidelines\n\n### PR Title & Commit Messages\n\n- Follow the [commit message convention](./commit-convention.md)\n\n### PR Description\n\n- What does this PR solve? - Clear problem/feature description\n- Why was this approach chosen? - Implementation rationale\n- If this is a new feature, include a convincing reason.\n- If this adds a new config option, verify problem can't be solved with smarter defaults, existing options, or a plugin\n- If this is a bug fix, explain what caused the bug - Link to relevant code if possible\n\n### Code Style & Standards\n\n- Code follows TypeScript best practices\n- Maintains existing code structure and organization\n- Comments explain \"why\", not \"what\"\n\n### Testing\n\n- Prefer unit tests if it can be tested without using mocks\n- E2E tests should be added in the `playground/` directory\n\n### Documentation\n\n- Update documentation for public API changes\n- Documentation changes go in `docs/` folder\n\n### Other Considerations\n\n- No concerning performance impacts\n","docs/plugins/index.md":"# Plugins\n\n:::tip NOTE\nVite aims to provide out-of-the-box support for common web development patterns. Before searching for a Vite or Compatible Rollup plugin, check out the [Features Guide](../guide/features.md). A lot of the cases where a plugin would be needed in a Rollup project are already covered in Vite.\n:::\n\nCheck out [Using Plugins](../guide/using-plugins) for information on how to use plugins.\n\n## Official Plugins\n\n### [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue)\n\nProvides Vue 3 Single File Components support.\n\n### [@vitejs/plugin-vue-jsx](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue-jsx)\n\nProvides Vue 3 JSX support (via [dedicated Babel transform](https://github.com/vuejs/babel-plugin-jsx)).\n\n### [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react)\n\nProvides React Fast Refresh support via [Oxc Transformer](https://oxc.rs/docs/guide/usage/transformer).\n\n### [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-swc)\n\nReplaces Oxc with [SWC](https://swc.rs/) during development for SWC plugin usage. During production builds, SWC+Oxc Transformer are used when using plugins. For big projects that require custom plugins, cold start and Hot Module Replacement (HMR) can be significantly faster, if the plugin is also available for SWC.\n\n### [@vitejs/plugin-rsc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc)\n\nVite supports [React Server Components (RSC)](https://react.dev/reference/rsc/server-components) through the plugin. It utilizes the [Environment API](/guide/api-environment) to provide low-level primitives that React frameworks can use to integrate RSC features. You can try a minimal standalone RSC application with:\n\n```bash\nnpm create vite@latest -- --template rsc\n```\n\nRead the [plugin documentation](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc) to learn more.\n\n### [@vitejs/plugin-legacy](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy)\n\nProvides legacy browsers support for the production build.\n\n## Community Plugins\n\nCheck out [Vite Plugin Registry](https://registry.vite.dev/plugins) for the list of plugins published to npm.\n\n## Rolldown Built-in Plugins\n\nVite uses [Rolldown](https://rolldown.rs/) under the hood and it provides a few built-in plugins for common use cases.\n\nRead the [Rolldown Built-in Plugins section](https://rolldown.rs/builtin-plugins/) for more information.\n\n## Rolldown / Rollup Plugins\n\n[Vite plugins](../guide/api-plugin) are an extension of Rollup's plugin interface. Check out the [Rollup Plugin Compatibility section](../guide/api-plugin#rolldown-plugin-compatibility) for more information.\n","packages/create-vite/README.md":"# create-vite <a href=\"https://npmjs.com/package/create-vite\"><img src=\"https://img.shields.io/npm/v/create-vite\" alt=\"npm package\"></a>\n\n## Scaffolding Your First Vite Project\n\n> **Compatibility Note:**\n> Vite requires [Node.js](https://nodejs.org/en/) version 20.19+, 22.12+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.\n\nWith NPM:\n\n```bash\nnpm create vite@latest\n```\n\nWith Yarn:\n\n```bash\nyarn create vite\n```\n\nWith PNPM:\n\n```bash\npnpm create vite\n```\n\nWith Bun:\n\n```bash\nbun create vite\n```\n\nWith Deno:\n\n```bash\ndeno init --npm vite\n```\n\nThen follow the prompts!\n\nYou can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a Vite + Vue project, run:\n\n```bash\n# npm 7+, extra double-dash is needed:\nnpm create vite@latest my-vue-app -- --template vue\n\n# yarn\nyarn create vite my-vue-app --template vue\n\n# pnpm\npnpm create vite my-vue-app --template vue\n\n# Bun\nbun create vite my-vue-app --template vue\n\n# Deno\ndeno init --npm vite my-vue-app --template vue\n```\n\nCurrently supported template presets include:\n\n- `vanilla`\n- `vanilla-ts`\n- `vue`\n- `vue-ts`\n- `react`\n- `react-compiler`\n- `react-ts`\n- `react-compiler-ts`\n- `preact`\n- `preact-ts`\n- `lit`\n- `lit-ts`\n- `svelte`\n- `svelte-ts`\n- `solid`\n- `solid-ts`\n- `qwik`\n- `qwik-ts`\n\nYou can use `.` for the project name to scaffold in the current directory.\n\n## Community Templates\n\ncreate-vite is a tool to quickly start a project from a basic template for popular frameworks. Check out Awesome Vite for [community maintained templates](https://github.com/vitejs/awesome-vite#templates) that include other tools or target different frameworks. You can use a tool like [tiged](https://github.com/tiged/tiged) to scaffold your project with one of the templates.\n\n```bash\nnpx tiged user/project my-project\ncd my-project\n\nnpm install\nnpm run dev\n```\n","packages/create-vite/template-qwik-ts/README.md":"# Qwik + Vite\n\n## Qwik in CSR mode\n\nThis starter is using a pure CSR (Client-Side Rendering) mode. This means, that the application is fully bootstrapped in the browser. Most of Qwik innovations however take advantage of SSR (Server-Side Rendering) mode.\n\n```ts\nexport default defineConfig({\n  plugins: [\n    qwikVite({\n      csr: true,\n    }),\n  ],\n})\n```\n\nUse `npm create qwik@latest` to create a full production ready Qwik application, using SSR and [QwikCity](https://qwik.dev/docs/qwikcity/), our server-side meta-framework.\n\n## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\nLearn more on the [Qwik Website](https://qwik.dev) and join our community on our [Discord](https://qwik.dev/chat)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\n","packages/create-vite/template-qwik/README.md":"# Qwik + Vite\n\n## Qwik in CSR mode\n\nThis starter is using a pure CSR (Client-Side Rendering) mode. This means, that the application is fully bootstrapped in the browser. Most of Qwik innovations however take advantage of SSR (Server-Side Rendering) mode.\n\n```ts\nexport default defineConfig({\n  plugins: [\n    qwikVite({\n      csr: true,\n    }),\n  ],\n})\n```\n\nUse `npm create qwik@latest` to create a full production ready Qwik application, using SSR and [QwikCity](https://qwik.dev/docs/qwikcity/), our server-side meta-framework.\n\n## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\nLearn more on the [Qwik Website](https://qwik.dev) and join our community on our [Discord](https://qwik.dev/chat)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\n","packages/create-vite/template-react-ts/README.md":"# React + TypeScript + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)\n\n## React Compiler\n\nThe React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).\n\n## Expanding the Oxlint configuration\n\nIf you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`:\n\n```json\n{\n  \"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n  \"plugins\": [\"react\", \"typescript\", \"oxc\"],\n  \"options\": {\n    \"typeAware\": true\n  },\n  \"rules\": {\n    \"react/rules-of-hooks\": \"error\",\n    \"react/only-export-components\": [\"warn\", { \"allowConstantExport\": true }]\n  }\n}\n```\n\nSee the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories.\n","packages/create-vite/template-react/README.md":"# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)\n\n## React Compiler\n\nThe React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).\n\n## Expanding the Oxlint configuration\n\nIf you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and Oxlint's TypeScript related rules in your project.\n","packages/create-vite/template-solid-ts/README.md":"## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\n### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\nIt correctly bundles Solid in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.<br>\nYour app is ready to be deployed!\n\n## Deployment\n\nLearn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html)\n","packages/create-vite/template-solid/README.md":"## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\n### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\nIt correctly bundles Solid in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.<br>\nYour app is ready to be deployed!\n\n## Deployment\n\nLearn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html)\n","packages/create-vite/template-svelte-ts/README.md":"# Svelte + TS + Vite\n\nThis template should help get you started developing with Svelte and TypeScript in Vite.\n\n## Recommended IDE Setup\n\n[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).\n\n## Need an official Svelte framework?\n\nCheck out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.\n\n## Technical considerations\n\n**Why use this over SvelteKit?**\n\n- It brings its own routing solution which might not be preferable for some users.\n- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.\n\nThis template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.\n\nShould you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.\n\n**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**\n\nSetting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.\n\n**Why include `.vscode/extensions.json`?**\n\nOther templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.\n\n**Why enable `allowJs` in the TS template?**\n\nWhile `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.\n\n**Why is HMR not preserving my local component state?**\n\nHMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).\n\nIf you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.\n\n```ts\n// store.ts\n// An extremely simple external store\nimport { writable } from 'svelte/store'\nexport default writable(0)\n```\n","packages/create-vite/template-svelte/README.md":"# Svelte + Vite\n\nThis template should help get you started developing with Svelte in Vite.\n\n## Recommended IDE Setup\n\n[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).\n\n## Need an official Svelte framework?\n\nCheck out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.\n\n## Technical considerations\n\n**Why use this over SvelteKit?**\n\n- It brings its own routing solution which might not be preferable for some users.\n- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.\n\nThis template contains as little as possible to get started with Vite + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.\n\nShould you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.\n\n**Why include `.vscode/extensions.json`?**\n\nOther templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.\n\n**Why enable `checkJs` in the JS template?**\n\nIt is likely that most cases of changing variable types in runtime are likely to be accidental, rather than deliberate. This provides advanced typechecking out of the box. Should you like to take advantage of the dynamically-typed nature of JavaScript, it is trivial to change the configuration.\n\n**Why is HMR not preserving my local component state?**\n\nHMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/sveltejs/svelte-hmr/tree/master/packages/svelte-hmr#preservation-of-local-state).\n\nIf you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.\n\n```js\n// store.js\n// An extremely simple external store\nimport { writable } from 'svelte/store'\nexport default writable(0)\n```\n","packages/create-vite/template-vue-ts/README.md":"# Vue 3 + TypeScript + Vite\n\nThis template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.\n\nLearn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).\n","packages/create-vite/template-vue/README.md":"# Vue 3 + Vite\n\nThis template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.\n\nLearn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).\n","packages/plugin-legacy/README.md":"# @vitejs/plugin-legacy [![npm](https://img.shields.io/npm/v/@vitejs/plugin-legacy.svg)](https://npmjs.com/package/@vitejs/plugin-legacy)\n\nVite's minimum browser support target is [native ESM dynamic import](https://caniuse.com/es6-module-dynamic-import), and [`import.meta`](https://caniuse.com/mdn-javascript_operators_import_meta). This plugin provides support for legacy browsers that do not support those features when building for production.\n\nBy default, this plugin will:\n\n- Generate a corresponding legacy chunk for every chunk in the final bundle, transformed with [@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env) and emitted as [SystemJS modules](https://github.com/systemjs/systemjs) (code splitting is still supported!).\n\n- Generate a polyfill chunk including SystemJS runtime, and any necessary polyfills determined by specified browser targets and **actual usage** in the bundle.\n\n- Inject `<script nomodule>` tags into generated HTML to conditionally load the polyfills and legacy bundle only in browsers without widely-available features support.\n\n- Inject the `import.meta.env.LEGACY` env variable, which will only be `true` in the legacy production build, and `false` in all other cases.\n\n## Usage\n\n```js\n// vite.config.js\nimport legacy from '@vitejs/plugin-legacy'\n\nexport default {\n  plugins: [\n    legacy({\n      targets: ['defaults', 'not IE 11'],\n    }),\n  ],\n}\n```\n\n> Terser must be installed for minification when using Vite versions older than 8.1.4 or when [`build.minify`](https://vite.dev/config/build-options#build-minify) is explicitly set to `terser`.\n>\n> ```sh\n> npm add -D terser\n> ```\n\n## Options\n\n### `targets`\n\n- **Type:** `string | string[] | { [key: string]: string }`\n- **Default:** [`'last 2 versions and not dead, > 0.3%, Firefox ESR'`](https://browsersl.ist/#q=last+2+versions+and+not+dead%2C+%3E+0.3%25%2C+Firefox+ESR)\n\n  It's passed on to [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#targets) when rendering **legacy chunks**.\n\n  The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.\n\n  If it's not set, plugin-legacy will load [the browserslist config sources](https://github.com/browserslist/browserslist#queries) and then fallback to the default value.\n\n### `modernTargets`\n\n- **Type:** `string | string[]`\n- **Default:** [`'edge>=105, firefox>=106, chrome>=105, safari>=16.4, chromeAndroid>=105, iOS>=16.4'`](https://browsersl.ist/#q=edge%3E%3D105%2C+firefox%3E%3D106%2C+chrome%3E%3D105%2C+safari%3E%3D16.4%2C+chromeAndroid%3E%3D105%2C+iOS%3E%3D16.4)\n\n  It's passed on to [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#targets) when collecting polyfills for **modern chunks**. The value set here will override the `build.target` option.\n\n  The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.\n\n  If it's not set, plugin-legacy will fallback to the default value.\n\n  Note that this options should not be set unless `renderLegacyChunks` is set to `false`.\n\n### `polyfills`\n\n- **Type:** `boolean | string[]`\n- **Default:** `true`\n\n  By default, a polyfills chunk is generated based on the target browser ranges and actual usage in the final bundle (detected via `@babel/preset-env`'s `useBuiltIns: 'usage'`).\n\n  Set to a list of strings to explicitly control which polyfills to include. See [Polyfill Specifiers](#polyfill-specifiers) for details.\n\n  Set to `false` to avoid generating polyfills and handle it yourself (will still generate legacy chunks with syntax transformations).\n\n### `additionalLegacyPolyfills`\n\n- **Type:** `string[]`\n\n  Add custom imports to the legacy polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option.\n\n### `additionalModernPolyfills`\n\n- **Type:** `string[]`\n\n  Add custom imports to the modern polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option.\n\n### `modernPolyfills`\n\n- **Type:** `boolean | string[]`\n- **Default:** `false`\n\n  Defaults to `false`. Enabling this option will generate a separate polyfills chunk for the modern build (targeting [browsers that support widely-available features](#browsers-that-supports-esm-but-does-not-support-widely-available-features)).\n\n  Set to a list of strings to explicitly control which polyfills to include. See [Polyfill Specifiers](#polyfill-specifiers) for details.\n\n  If `modernTargets` is not set, it is **not recommended** to use the `true` value (which uses auto-detection) because `core-js@3` is very aggressive in polyfill inclusions due to all the bleeding edge features it supports. Even when targeting native ESM support, it injects 15kb of polyfills!\n\n  If you don't have hard reliance on bleeding edge runtime features, it is not that hard to avoid having to use polyfills in the modern build altogether. Alternatively, consider setting `modernTargets` or using an on-demand service like https://cdnjs.cloudflare.com/polyfill/ to only inject necessary polyfills based on actual browser user-agents (most modern browsers will need nothing!).\n\n### `renderLegacyChunks`\n\n- **Type:** `boolean`\n- **Default:** `true`\n\n  Set to `false` to disable legacy chunks. This is only useful if you are using `modernPolyfills`, which essentially allows you to use this plugin for injecting polyfills to the modern build only:\n\n  ```js\n  import legacy from '@vitejs/plugin-legacy'\n\n  export default {\n    plugins: [\n      legacy({\n        modernPolyfills: [/* ... */],\n        renderLegacyChunks: false,\n      }),\n    ],\n  }\n  ```\n\n### `externalSystemJS`\n\n- **Type:** `boolean`\n- **Default:** `false`\n\n  Defaults to `false`. Enabling this option will exclude `systemjs/dist/s.min.js` inside polyfills-legacy chunk.\n\n### `renderModernChunks`\n\n- **Type:** `boolean`\n- **Default:** `true`\n\n  Set to `false` to only output the legacy bundles that support all target browsers.\n\n  This is also useful when running the project locally using `file:` protocol, as loading modern chunks with `type=\"module\"` may trigger CORS restrictions. To avoid this issue, simply set `renderModernChunks` to `false` to exclusively use legacy chunks instead.\n\n## Browsers that supports ESM but does not support widely-available features\n\nThe legacy plugin offers a way to use widely-available features natively in the modern build, while falling back to the legacy build in browsers with native ESM but without those features supported (e.g. Legacy Edge). This feature works by injecting a runtime check and loading the legacy bundle with SystemJS runtime if needed. There are the following drawbacks:\n\n- Modern bundle is downloaded in all ESM browsers\n- Modern bundle throws an error in browsers without those features support\n\nThe following features are considered as widely-available:\n\n- dynamic import\n- async generator\n- `import.meta.resolve`\n\n## Polyfill Specifiers\n\nPolyfill specifier strings for `polyfills` and `modernPolyfills` can be either of the following:\n\n- Any [`core-js` 3 sub import paths](https://unpkg.com/browse/core-js@latest/) - e.g. `es/map` will import `core-js/es/map`\n\n- Any [individual `core-js` 3 modules](https://unpkg.com/browse/core-js@latest/modules/) - e.g. `es.array.iterator` will import `core-js/modules/es.array.iterator.js`\n\n**Example**\n\n```js\nimport legacy from '@vitejs/plugin-legacy'\n\nexport default {\n  plugins: [\n    legacy({\n      polyfills: ['es.promise.finally', 'es/map', 'es/set'],\n      modernPolyfills: ['es.promise.finally'],\n    }),\n  ],\n}\n```\n\n## Content Security Policy\n\nThe legacy plugin requires inline scripts for [Safari 10.1 `nomodule` fix](https://gist.github.com/samthor/64b114e4a4f539915a95b91ffd340acc), SystemJS initialization, and dynamic import fallback. If you have a strict CSP policy requirement, you will need to [add the corresponding hashes to your `script-src` list](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_inline_script).\n\nThe hash values (without the `sha256-` prefix) can be retrieved via:\n\n```js\nimport { cspHashes } from '@vitejs/plugin-legacy'\n```\n\nThe current values are:\n\n- `sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=`\n- `sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=`\n- `sha256-w36slEqa9euNKxfvkw+LLGsDIr++3rsZXpZxtmRh8Aw=`\n- `sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc=`\n\n<!--\nRun `node --input-type=module -e \"import {cspHashes} from '@vitejs/plugin-legacy'; console.log(cspHashes.map(h => 'sha256-'+h))\"` to retrieve the value.\n-->\n\nNote that these values could change between minor versions. Thus, we recommend generating the CSP header from the exported `cspHashes` variable. If you copy the values manually, then you should pin the minor version using `~`.\n\nWhen using the `regenerator-runtime` polyfill, it will attempt to use the `globalThis` object to register itself. If `globalThis` is not available (it is [fairly new](https://caniuse.com/?search=globalThis) and not widely supported, including IE 11), it attempts to perform dynamic `Function(...)` call which violates the CSP. To avoid dynamic `eval` in the absence of `globalThis` consider adding `core-js/proposals/global-this` to `additionalLegacyPolyfills` to define it.\n\n## References\n\n- [Vue CLI modern mode](https://cli.vuejs.org/guide/browser-compatibility.html#modern-mode)\n- [Using Native JavaScript Modules in Production Today](https://philipwalton.com/articles/using-native-javascript-modules-in-production-today/)\n- [rollup-native-modules-boilerplate](https://github.com/philipwalton/rollup-native-modules-boilerplate)\n","packages/vite/README.md":"# Vite ⚡\n\n> Next Generation Frontend Tooling\n\n- 💡 Instant Server Start\n- ⚡️ Lightning Fast HMR\n- 🛠️ Rich Features\n- 📦 Optimized Build\n- 🔩 Universal Plugin Interface\n- 🔑 Fully Typed APIs\n\nVite (French word for \"quick\", pronounced [`/viːt/`](https://cdn.jsdelivr.net/gh/vitejs/vite@main/docs/public/vite.mp3), like \"veet\") is a build tool that aims to provide a faster and leaner development experience for modern web projects. It consists of two major parts:\n\n- A dev server that provides [rich feature enhancements](https://vite.dev/guide/features) over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), for example extremely fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features#hot-module-replacement).\n\n- A build command that bundles your code with [Rolldown](https://rolldown.rs), pre-configured to output highly optimized static assets for production.\n\nIn addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.html) and [JavaScript API](https://vite.dev/guide/api-javascript.html) with full typing support.\n\n[Read the Docs to Learn More](https://vite.dev).\n",".cursorrules (typescript-nodejs-react-vite-cursorrules-prompt-fi.mdc)":"---\ndescription: \"Cursor rules for TypeScript development with Node.js, React, and Vite integration.\"\nglobs: **/*\nalwaysApply: false\n---\nYou are an expert in TypeScript, Node.js, React, Vite, TanStack Query, TanStack Router, and Tailwind.\n\nResponse Constraints\n- Do not remove any existing code unless necessary.\n- Do not remove my comments or commented-out code unless necessary.\n- Do not change the formatting of my imports.\n- Do not change the formatting of my code unless important for new functionality.\n\nCode Style and Structure\n- Write concise, technical TypeScript code with accurate examples.\n- Use functional and declarative programming patterns; avoid classes.\n- Prefer iteration and modularization over code duplication.\n- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).\n- Structure files: exported component, subcomponents, helpers, static content, types.\n\nNaming Conventions\n- Use lowercase with dashes for directories (e.g., components/auth-wizard).\n- Favor named exports for components.\n\nTypeScript Usage\n- Use TypeScript for all code; prefer interfaces over types.\n- Avoid enums; use maps instead.\n- Use functional components with TypeScript interfaces.\n\nSyntax and Formatting\n- Use the \"function\" keyword for pure functions.\n- Use curly braces for all conditionals. Favor simplicity over cleverness.\n- Use declarative JSX.\n\nUI and Styling\n- Use Tailwind for components and styling.\n\nPerformance Optimization\n- Look for ways to make things faster:\n  - Use immutable data structures\n  - Use efficient data fetching strategies\n  - Optimize network requests\n  - Use efficient data structures\n  - Use efficient algorithms\n  - Use efficient rendering strategies\n  - Use efficient state management\n"},"files":{".github/copilot-instructions.md":"This is a TypeScript project that implements a frontend build tooling called Vite. Please follow these guidelines when contributing:\n\n## Code Standards\n\n- Run `pnpm run lint` to ensure that your code adheres to the code standards.\n- Run `pnpm run format` to format your code.\n- Build: `pnpm run build`\n- Test: `pnpm run test` (uses Vitest and Playwright)\n\n## Repository Structure\n\n- `docs/`: Documentation\n- `packages/create-vite`: The source code for the `create-vite` command\n- `packages/plugin-legacy`: The source code for the `@vitejs/plugin-legacy` plugin\n- `packages/vite`: The source code for the Vite core\n- `playground/`: E2E tests\n\n## PR Guidelines\n\n### PR Title & Commit Messages\n\n- Follow the [commit message convention](./commit-convention.md)\n\n### PR Description\n\n- What does this PR solve? - Clear problem/feature description\n- Why was this approach chosen? - Implementation rationale\n- If this is a new feature, include a convincing reason.\n- If this adds a new config option, verify problem can't be solved with smarter defaults, existing options, or a plugin\n- If this is a bug fix, explain what caused the bug - Link to relevant code if possible\n\n### Code Style & Standards\n\n- Code follows TypeScript best practices\n- Maintains existing code structure and organization\n- Comments explain \"why\", not \"what\"\n\n### Testing\n\n- Prefer unit tests if it can be tested without using mocks\n- E2E tests should be added in the `playground/` directory\n\n### Documentation\n\n- Update documentation for public API changes\n- Documentation changes go in `docs/` folder\n\n### Other Considerations\n\n- No concerning performance impacts\n","docs/plugins/index.md":"# Plugins\n\n:::tip NOTE\nVite aims to provide out-of-the-box support for common web development patterns. Before searching for a Vite or Compatible Rollup plugin, check out the [Features Guide](../guide/features.md). A lot of the cases where a plugin would be needed in a Rollup project are already covered in Vite.\n:::\n\nCheck out [Using Plugins](../guide/using-plugins) for information on how to use plugins.\n\n## Official Plugins\n\n### [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue)\n\nProvides Vue 3 Single File Components support.\n\n### [@vitejs/plugin-vue-jsx](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue-jsx)\n\nProvides Vue 3 JSX support (via [dedicated Babel transform](https://github.com/vuejs/babel-plugin-jsx)).\n\n### [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react)\n\nProvides React Fast Refresh support via [Oxc Transformer](https://oxc.rs/docs/guide/usage/transformer).\n\n### [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-swc)\n\nReplaces Oxc with [SWC](https://swc.rs/) during development for SWC plugin usage. During production builds, SWC+Oxc Transformer are used when using plugins. For big projects that require custom plugins, cold start and Hot Module Replacement (HMR) can be significantly faster, if the plugin is also available for SWC.\n\n### [@vitejs/plugin-rsc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc)\n\nVite supports [React Server Components (RSC)](https://react.dev/reference/rsc/server-components) through the plugin. It utilizes the [Environment API](/guide/api-environment) to provide low-level primitives that React frameworks can use to integrate RSC features. You can try a minimal standalone RSC application with:\n\n```bash\nnpm create vite@latest -- --template rsc\n```\n\nRead the [plugin documentation](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc) to learn more.\n\n### [@vitejs/plugin-legacy](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy)\n\nProvides legacy browsers support for the production build.\n\n## Community Plugins\n\nCheck out [Vite Plugin Registry](https://registry.vite.dev/plugins) for the list of plugins published to npm.\n\n## Rolldown Built-in Plugins\n\nVite uses [Rolldown](https://rolldown.rs/) under the hood and it provides a few built-in plugins for common use cases.\n\nRead the [Rolldown Built-in Plugins section](https://rolldown.rs/builtin-plugins/) for more information.\n\n## Rolldown / Rollup Plugins\n\n[Vite plugins](../guide/api-plugin) are an extension of Rollup's plugin interface. Check out the [Rollup Plugin Compatibility section](../guide/api-plugin#rolldown-plugin-compatibility) for more information.\n","packages/create-vite/README.md":"# create-vite <a href=\"https://npmjs.com/package/create-vite\"><img src=\"https://img.shields.io/npm/v/create-vite\" alt=\"npm package\"></a>\n\n## Scaffolding Your First Vite Project\n\n> **Compatibility Note:**\n> Vite requires [Node.js](https://nodejs.org/en/) version 20.19+, 22.12+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.\n\nWith NPM:\n\n```bash\nnpm create vite@latest\n```\n\nWith Yarn:\n\n```bash\nyarn create vite\n```\n\nWith PNPM:\n\n```bash\npnpm create vite\n```\n\nWith Bun:\n\n```bash\nbun create vite\n```\n\nWith Deno:\n\n```bash\ndeno init --npm vite\n```\n\nThen follow the prompts!\n\nYou can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a Vite + Vue project, run:\n\n```bash\n# npm 7+, extra double-dash is needed:\nnpm create vite@latest my-vue-app -- --template vue\n\n# yarn\nyarn create vite my-vue-app --template vue\n\n# pnpm\npnpm create vite my-vue-app --template vue\n\n# Bun\nbun create vite my-vue-app --template vue\n\n# Deno\ndeno init --npm vite my-vue-app --template vue\n```\n\nCurrently supported template presets include:\n\n- `vanilla`\n- `vanilla-ts`\n- `vue`\n- `vue-ts`\n- `react`\n- `react-compiler`\n- `react-ts`\n- `react-compiler-ts`\n- `preact`\n- `preact-ts`\n- `lit`\n- `lit-ts`\n- `svelte`\n- `svelte-ts`\n- `solid`\n- `solid-ts`\n- `qwik`\n- `qwik-ts`\n\nYou can use `.` for the project name to scaffold in the current directory.\n\n## Community Templates\n\ncreate-vite is a tool to quickly start a project from a basic template for popular frameworks. Check out Awesome Vite for [community maintained templates](https://github.com/vitejs/awesome-vite#templates) that include other tools or target different frameworks. You can use a tool like [tiged](https://github.com/tiged/tiged) to scaffold your project with one of the templates.\n\n```bash\nnpx tiged user/project my-project\ncd my-project\n\nnpm install\nnpm run dev\n```\n","packages/create-vite/template-qwik-ts/README.md":"# Qwik + Vite\n\n## Qwik in CSR mode\n\nThis starter is using a pure CSR (Client-Side Rendering) mode. This means, that the application is fully bootstrapped in the browser. Most of Qwik innovations however take advantage of SSR (Server-Side Rendering) mode.\n\n```ts\nexport default defineConfig({\n  plugins: [\n    qwikVite({\n      csr: true,\n    }),\n  ],\n})\n```\n\nUse `npm create qwik@latest` to create a full production ready Qwik application, using SSR and [QwikCity](https://qwik.dev/docs/qwikcity/), our server-side meta-framework.\n\n## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\nLearn more on the [Qwik Website](https://qwik.dev) and join our community on our [Discord](https://qwik.dev/chat)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\n","packages/create-vite/template-qwik/README.md":"# Qwik + Vite\n\n## Qwik in CSR mode\n\nThis starter is using a pure CSR (Client-Side Rendering) mode. This means, that the application is fully bootstrapped in the browser. Most of Qwik innovations however take advantage of SSR (Server-Side Rendering) mode.\n\n```ts\nexport default defineConfig({\n  plugins: [\n    qwikVite({\n      csr: true,\n    }),\n  ],\n})\n```\n\nUse `npm create qwik@latest` to create a full production ready Qwik application, using SSR and [QwikCity](https://qwik.dev/docs/qwikcity/), our server-side meta-framework.\n\n## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\nLearn more on the [Qwik Website](https://qwik.dev) and join our community on our [Discord](https://qwik.dev/chat)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\n","packages/create-vite/template-react-ts/README.md":"# React + TypeScript + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)\n\n## React Compiler\n\nThe React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).\n\n## Expanding the Oxlint configuration\n\nIf you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`:\n\n```json\n{\n  \"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n  \"plugins\": [\"react\", \"typescript\", \"oxc\"],\n  \"options\": {\n    \"typeAware\": true\n  },\n  \"rules\": {\n    \"react/rules-of-hooks\": \"error\",\n    \"react/only-export-components\": [\"warn\", { \"allowConstantExport\": true }]\n  }\n}\n```\n\nSee the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories.\n","packages/create-vite/template-react/README.md":"# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)\n\n## React Compiler\n\nThe React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).\n\n## Expanding the Oxlint configuration\n\nIf you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and Oxlint's TypeScript related rules in your project.\n","packages/create-vite/template-solid-ts/README.md":"## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\n### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\nIt correctly bundles Solid in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.<br>\nYour app is ready to be deployed!\n\n## Deployment\n\nLearn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html)\n","packages/create-vite/template-solid/README.md":"## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\n### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\nIt correctly bundles Solid in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.<br>\nYour app is ready to be deployed!\n\n## Deployment\n\nLearn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html)\n","packages/create-vite/template-svelte-ts/README.md":"# Svelte + TS + Vite\n\nThis template should help get you started developing with Svelte and TypeScript in Vite.\n\n## Recommended IDE Setup\n\n[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).\n\n## Need an official Svelte framework?\n\nCheck out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.\n\n## Technical considerations\n\n**Why use this over SvelteKit?**\n\n- It brings its own routing solution which might not be preferable for some users.\n- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.\n\nThis template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.\n\nShould you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.\n\n**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**\n\nSetting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.\n\n**Why include `.vscode/extensions.json`?**\n\nOther templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.\n\n**Why enable `allowJs` in the TS template?**\n\nWhile `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.\n\n**Why is HMR not preserving my local component state?**\n\nHMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).\n\nIf you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.\n\n```ts\n// store.ts\n// An extremely simple external store\nimport { writable } from 'svelte/store'\nexport default writable(0)\n```\n","packages/create-vite/template-svelte/README.md":"# Svelte + Vite\n\nThis template should help get you started developing with Svelte in Vite.\n\n## Recommended IDE Setup\n\n[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).\n\n## Need an official Svelte framework?\n\nCheck out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.\n\n## Technical considerations\n\n**Why use this over SvelteKit?**\n\n- It brings its own routing solution which might not be preferable for some users.\n- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.\n\nThis template contains as little as possible to get started with Vite + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.\n\nShould you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.\n\n**Why include `.vscode/extensions.json`?**\n\nOther templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.\n\n**Why enable `checkJs` in the JS template?**\n\nIt is likely that most cases of changing variable types in runtime are likely to be accidental, rather than deliberate. This provides advanced typechecking out of the box. Should you like to take advantage of the dynamically-typed nature of JavaScript, it is trivial to change the configuration.\n\n**Why is HMR not preserving my local component state?**\n\nHMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/sveltejs/svelte-hmr/tree/master/packages/svelte-hmr#preservation-of-local-state).\n\nIf you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.\n\n```js\n// store.js\n// An extremely simple external store\nimport { writable } from 'svelte/store'\nexport default writable(0)\n```\n","packages/create-vite/template-vue-ts/README.md":"# Vue 3 + TypeScript + Vite\n\nThis template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.\n\nLearn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).\n","packages/create-vite/template-vue/README.md":"# Vue 3 + Vite\n\nThis template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.\n\nLearn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).\n","packages/plugin-legacy/README.md":"# @vitejs/plugin-legacy [![npm](https://img.shields.io/npm/v/@vitejs/plugin-legacy.svg)](https://npmjs.com/package/@vitejs/plugin-legacy)\n\nVite's minimum browser support target is [native ESM dynamic import](https://caniuse.com/es6-module-dynamic-import), and [`import.meta`](https://caniuse.com/mdn-javascript_operators_import_meta). This plugin provides support for legacy browsers that do not support those features when building for production.\n\nBy default, this plugin will:\n\n- Generate a corresponding legacy chunk for every chunk in the final bundle, transformed with [@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env) and emitted as [SystemJS modules](https://github.com/systemjs/systemjs) (code splitting is still supported!).\n\n- Generate a polyfill chunk including SystemJS runtime, and any necessary polyfills determined by specified browser targets and **actual usage** in the bundle.\n\n- Inject `<script nomodule>` tags into generated HTML to conditionally load the polyfills and legacy bundle only in browsers without widely-available features support.\n\n- Inject the `import.meta.env.LEGACY` env variable, which will only be `true` in the legacy production build, and `false` in all other cases.\n\n## Usage\n\n```js\n// vite.config.js\nimport legacy from '@vitejs/plugin-legacy'\n\nexport default {\n  plugins: [\n    legacy({\n      targets: ['defaults', 'not IE 11'],\n    }),\n  ],\n}\n```\n\n> Terser must be installed for minification when using Vite versions older than 8.1.4 or when [`build.minify`](https://vite.dev/config/build-options#build-minify) is explicitly set to `terser`.\n>\n> ```sh\n> npm add -D terser\n> ```\n\n## Options\n\n### `targets`\n\n- **Type:** `string | string[] | { [key: string]: string }`\n- **Default:** [`'last 2 versions and not dead, > 0.3%, Firefox ESR'`](https://browsersl.ist/#q=last+2+versions+and+not+dead%2C+%3E+0.3%25%2C+Firefox+ESR)\n\n  It's passed on to [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#targets) when rendering **legacy chunks**.\n\n  The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.\n\n  If it's not set, plugin-legacy will load [the browserslist config sources](https://github.com/browserslist/browserslist#queries) and then fallback to the default value.\n\n### `modernTargets`\n\n- **Type:** `string | string[]`\n- **Default:** [`'edge>=105, firefox>=106, chrome>=105, safari>=16.4, chromeAndroid>=105, iOS>=16.4'`](https://browsersl.ist/#q=edge%3E%3D105%2C+firefox%3E%3D106%2C+chrome%3E%3D105%2C+safari%3E%3D16.4%2C+chromeAndroid%3E%3D105%2C+iOS%3E%3D16.4)\n\n  It's passed on to [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#targets) when collecting polyfills for **modern chunks**. The value set here will override the `build.target` option.\n\n  The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.\n\n  If it's not set, plugin-legacy will fallback to the default value.\n\n  Note that this options should not be set unless `renderLegacyChunks` is set to `false`.\n\n### `polyfills`\n\n- **Type:** `boolean | string[]`\n- **Default:** `true`\n\n  By default, a polyfills chunk is generated based on the target browser ranges and actual usage in the final bundle (detected via `@babel/preset-env`'s `useBuiltIns: 'usage'`).\n\n  Set to a list of strings to explicitly control which polyfills to include. See [Polyfill Specifiers](#polyfill-specifiers) for details.\n\n  Set to `false` to avoid generating polyfills and handle it yourself (will still generate legacy chunks with syntax transformations).\n\n### `additionalLegacyPolyfills`\n\n- **Type:** `string[]`\n\n  Add custom imports to the legacy polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option.\n\n### `additionalModernPolyfills`\n\n- **Type:** `string[]`\n\n  Add custom imports to the modern polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option.\n\n### `modernPolyfills`\n\n- **Type:** `boolean | string[]`\n- **Default:** `false`\n\n  Defaults to `false`. Enabling this option will generate a separate polyfills chunk for the modern build (targeting [browsers that support widely-available features](#browsers-that-supports-esm-but-does-not-support-widely-available-features)).\n\n  Set to a list of strings to explicitly control which polyfills to include. See [Polyfill Specifiers](#polyfill-specifiers) for details.\n\n  If `modernTargets` is not set, it is **not recommended** to use the `true` value (which uses auto-detection) because `core-js@3` is very aggressive in polyfill inclusions due to all the bleeding edge features it supports. Even when targeting native ESM support, it injects 15kb of polyfills!\n\n  If you don't have hard reliance on bleeding edge runtime features, it is not that hard to avoid having to use polyfills in the modern build altogether. Alternatively, consider setting `modernTargets` or using an on-demand service like https://cdnjs.cloudflare.com/polyfill/ to only inject necessary polyfills based on actual browser user-agents (most modern browsers will need nothing!).\n\n### `renderLegacyChunks`\n\n- **Type:** `boolean`\n- **Default:** `true`\n\n  Set to `false` to disable legacy chunks. This is only useful if you are using `modernPolyfills`, which essentially allows you to use this plugin for injecting polyfills to the modern build only:\n\n  ```js\n  import legacy from '@vitejs/plugin-legacy'\n\n  export default {\n    plugins: [\n      legacy({\n        modernPolyfills: [/* ... */],\n        renderLegacyChunks: false,\n      }),\n    ],\n  }\n  ```\n\n### `externalSystemJS`\n\n- **Type:** `boolean`\n- **Default:** `false`\n\n  Defaults to `false`. Enabling this option will exclude `systemjs/dist/s.min.js` inside polyfills-legacy chunk.\n\n### `renderModernChunks`\n\n- **Type:** `boolean`\n- **Default:** `true`\n\n  Set to `false` to only output the legacy bundles that support all target browsers.\n\n  This is also useful when running the project locally using `file:` protocol, as loading modern chunks with `type=\"module\"` may trigger CORS restrictions. To avoid this issue, simply set `renderModernChunks` to `false` to exclusively use legacy chunks instead.\n\n## Browsers that supports ESM but does not support widely-available features\n\nThe legacy plugin offers a way to use widely-available features natively in the modern build, while falling back to the legacy build in browsers with native ESM but without those features supported (e.g. Legacy Edge). This feature works by injecting a runtime check and loading the legacy bundle with SystemJS runtime if needed. There are the following drawbacks:\n\n- Modern bundle is downloaded in all ESM browsers\n- Modern bundle throws an error in browsers without those features support\n\nThe following features are considered as widely-available:\n\n- dynamic import\n- async generator\n- `import.meta.resolve`\n\n## Polyfill Specifiers\n\nPolyfill specifier strings for `polyfills` and `modernPolyfills` can be either of the following:\n\n- Any [`core-js` 3 sub import paths](https://unpkg.com/browse/core-js@latest/) - e.g. `es/map` will import `core-js/es/map`\n\n- Any [individual `core-js` 3 modules](https://unpkg.com/browse/core-js@latest/modules/) - e.g. `es.array.iterator` will import `core-js/modules/es.array.iterator.js`\n\n**Example**\n\n```js\nimport legacy from '@vitejs/plugin-legacy'\n\nexport default {\n  plugins: [\n    legacy({\n      polyfills: ['es.promise.finally', 'es/map', 'es/set'],\n      modernPolyfills: ['es.promise.finally'],\n    }),\n  ],\n}\n```\n\n## Content Security Policy\n\nThe legacy plugin requires inline scripts for [Safari 10.1 `nomodule` fix](https://gist.github.com/samthor/64b114e4a4f539915a95b91ffd340acc), SystemJS initialization, and dynamic import fallback. If you have a strict CSP policy requirement, you will need to [add the corresponding hashes to your `script-src` list](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_inline_script).\n\nThe hash values (without the `sha256-` prefix) can be retrieved via:\n\n```js\nimport { cspHashes } from '@vitejs/plugin-legacy'\n```\n\nThe current values are:\n\n- `sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=`\n- `sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=`\n- `sha256-w36slEqa9euNKxfvkw+LLGsDIr++3rsZXpZxtmRh8Aw=`\n- `sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc=`\n\n<!--\nRun `node --input-type=module -e \"import {cspHashes} from '@vitejs/plugin-legacy'; console.log(cspHashes.map(h => 'sha256-'+h))\"` to retrieve the value.\n-->\n\nNote that these values could change between minor versions. Thus, we recommend generating the CSP header from the exported `cspHashes` variable. If you copy the values manually, then you should pin the minor version using `~`.\n\nWhen using the `regenerator-runtime` polyfill, it will attempt to use the `globalThis` object to register itself. If `globalThis` is not available (it is [fairly new](https://caniuse.com/?search=globalThis) and not widely supported, including IE 11), it attempts to perform dynamic `Function(...)` call which violates the CSP. To avoid dynamic `eval` in the absence of `globalThis` consider adding `core-js/proposals/global-this` to `additionalLegacyPolyfills` to define it.\n\n## References\n\n- [Vue CLI modern mode](https://cli.vuejs.org/guide/browser-compatibility.html#modern-mode)\n- [Using Native JavaScript Modules in Production Today](https://philipwalton.com/articles/using-native-javascript-modules-in-production-today/)\n- [rollup-native-modules-boilerplate](https://github.com/philipwalton/rollup-native-modules-boilerplate)\n","packages/vite/README.md":"# Vite ⚡\n\n> Next Generation Frontend Tooling\n\n- 💡 Instant Server Start\n- ⚡️ Lightning Fast HMR\n- 🛠️ Rich Features\n- 📦 Optimized Build\n- 🔩 Universal Plugin Interface\n- 🔑 Fully Typed APIs\n\nVite (French word for \"quick\", pronounced [`/viːt/`](https://cdn.jsdelivr.net/gh/vitejs/vite@main/docs/public/vite.mp3), like \"veet\") is a build tool that aims to provide a faster and leaner development experience for modern web projects. It consists of two major parts:\n\n- A dev server that provides [rich feature enhancements](https://vite.dev/guide/features) over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), for example extremely fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features#hot-module-replacement).\n\n- A build command that bundles your code with [Rolldown](https://rolldown.rs), pre-configured to output highly optimized static assets for production.\n\nIn addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.html) and [JavaScript API](https://vite.dev/guide/api-javascript.html) with full typing support.\n\n[Read the Docs to Learn More](https://vite.dev).\n",".cursorrules (typescript-nodejs-react-vite-cursorrules-prompt-fi.mdc)":"---\ndescription: \"Cursor rules for TypeScript development with Node.js, React, and Vite integration.\"\nglobs: **/*\nalwaysApply: false\n---\nYou are an expert in TypeScript, Node.js, React, Vite, TanStack Query, TanStack Router, and Tailwind.\n\nResponse Constraints\n- Do not remove any existing code unless necessary.\n- Do not remove my comments or commented-out code unless necessary.\n- Do not change the formatting of my imports.\n- Do not change the formatting of my code unless important for new functionality.\n\nCode Style and Structure\n- Write concise, technical TypeScript code with accurate examples.\n- Use functional and declarative programming patterns; avoid classes.\n- Prefer iteration and modularization over code duplication.\n- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).\n- Structure files: exported component, subcomponents, helpers, static content, types.\n\nNaming Conventions\n- Use lowercase with dashes for directories (e.g., components/auth-wizard).\n- Favor named exports for components.\n\nTypeScript Usage\n- Use TypeScript for all code; prefer interfaces over types.\n- Avoid enums; use maps instead.\n- Use functional components with TypeScript interfaces.\n\nSyntax and Formatting\n- Use the \"function\" keyword for pure functions.\n- Use curly braces for all conditionals. Favor simplicity over cleverness.\n- Use declarative JSX.\n\nUI and Styling\n- Use Tailwind for components and styling.\n\nPerformance Optimization\n- Look for ways to make things faster:\n  - Use immutable data structures\n  - Use efficient data fetching strategies\n  - Optimize network requests\n  - Use efficient data structures\n  - Use efficient algorithms\n  - Use efficient rendering strategies\n  - Use efficient state management\n"},"items":[{"name":"copilot-instructions.md","path":".github/copilot-instructions.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/.github/copilot-instructions.md","title":"GitHub Copilot Instructions","category":"copilot-instructions","format":"markdown","content":"This is a TypeScript project that implements a frontend build tooling called Vite. Please follow these guidelines when contributing:\n\n## Code Standards\n\n- Run `pnpm run lint` to ensure that your code adheres to the code standards.\n- Run `pnpm run format` to format your code.\n- Build: `pnpm run build`\n- Test: `pnpm run test` (uses Vitest and Playwright)\n\n## Repository Structure\n\n- `docs/`: Documentation\n- `packages/create-vite`: The source code for the `create-vite` command\n- `packages/plugin-legacy`: The source code for the `@vitejs/plugin-legacy` plugin\n- `packages/vite`: The source code for the Vite core\n- `playground/`: E2E tests\n\n## PR Guidelines\n\n### PR Title & Commit Messages\n\n- Follow the [commit message convention](./commit-convention.md)\n\n### PR Description\n\n- What does this PR solve? - Clear problem/feature description\n- Why was this approach chosen? - Implementation rationale\n- If this is a new feature, include a convincing reason.\n- If this adds a new config option, verify problem can't be solved with smarter defaults, existing options, or a plugin\n- If this is a bug fix, explain what caused the bug - Link to relevant code if possible\n\n### Code Style & Standards\n\n- Code follows TypeScript best practices\n- Maintains existing code structure and organization\n- Comments explain \"why\", not \"what\"\n\n### Testing\n\n- Prefer unit tests if it can be tested without using mocks\n- E2E tests should be added in the `playground/` directory\n\n### Documentation\n\n- Update documentation for public API changes\n- Documentation changes go in `docs/` folder\n\n### Other Considerations\n\n- No concerning performance impacts\n","isInternal":false,"tokens":377,"sizeBytes":1632},{"name":"index.md","path":"docs/plugins/index.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/docs/plugins/index.md","title":"Plugins Skill","category":"anthropic-skill","format":"markdown","content":"# Plugins\n\n:::tip NOTE\nVite aims to provide out-of-the-box support for common web development patterns. Before searching for a Vite or Compatible Rollup plugin, check out the [Features Guide](../guide/features.md). A lot of the cases where a plugin would be needed in a Rollup project are already covered in Vite.\n:::\n\nCheck out [Using Plugins](../guide/using-plugins) for information on how to use plugins.\n\n## Official Plugins\n\n### [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue)\n\nProvides Vue 3 Single File Components support.\n\n### [@vitejs/plugin-vue-jsx](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue-jsx)\n\nProvides Vue 3 JSX support (via [dedicated Babel transform](https://github.com/vuejs/babel-plugin-jsx)).\n\n### [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react)\n\nProvides React Fast Refresh support via [Oxc Transformer](https://oxc.rs/docs/guide/usage/transformer).\n\n### [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-swc)\n\nReplaces Oxc with [SWC](https://swc.rs/) during development for SWC plugin usage. During production builds, SWC+Oxc Transformer are used when using plugins. For big projects that require custom plugins, cold start and Hot Module Replacement (HMR) can be significantly faster, if the plugin is also available for SWC.\n\n### [@vitejs/plugin-rsc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc)\n\nVite supports [React Server Components (RSC)](https://react.dev/reference/rsc/server-components) through the plugin. It utilizes the [Environment API](/guide/api-environment) to provide low-level primitives that React frameworks can use to integrate RSC features. You can try a minimal standalone RSC application with:\n\n```bash\nnpm create vite@latest -- --template rsc\n```\n\nRead the [plugin documentation](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc) to learn more.\n\n### [@vitejs/plugin-legacy](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy)\n\nProvides legacy browsers support for the production build.\n\n## Community Plugins\n\nCheck out [Vite Plugin Registry](https://registry.vite.dev/plugins) for the list of plugins published to npm.\n\n## Rolldown Built-in Plugins\n\nVite uses [Rolldown](https://rolldown.rs/) under the hood and it provides a few built-in plugins for common use cases.\n\nRead the [Rolldown Built-in Plugins section](https://rolldown.rs/builtin-plugins/) for more information.\n\n## Rolldown / Rollup Plugins\n\n[Vite plugins](../guide/api-plugin) are an extension of Rollup's plugin interface. Check out the [Rollup Plugin Compatibility section](../guide/api-plugin#rolldown-plugin-compatibility) for more information.\n","isInternal":false,"tokens":663,"sizeBytes":2810},{"name":"README.md","path":"packages/create-vite/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/create-vite/README.md","title":"create-vite Documentation","category":"plugin-manifest","format":"markdown","content":"# create-vite <a href=\"https://npmjs.com/package/create-vite\"><img src=\"https://img.shields.io/npm/v/create-vite\" alt=\"npm package\"></a>\n\n## Scaffolding Your First Vite Project\n\n> **Compatibility Note:**\n> Vite requires [Node.js](https://nodejs.org/en/) version 20.19+, 22.12+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.\n\nWith NPM:\n\n```bash\nnpm create vite@latest\n```\n\nWith Yarn:\n\n```bash\nyarn create vite\n```\n\nWith PNPM:\n\n```bash\npnpm create vite\n```\n\nWith Bun:\n\n```bash\nbun create vite\n```\n\nWith Deno:\n\n```bash\ndeno init --npm vite\n```\n\nThen follow the prompts!\n\nYou can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a Vite + Vue project, run:\n\n```bash\n# npm 7+, extra double-dash is needed:\nnpm create vite@latest my-vue-app -- --template vue\n\n# yarn\nyarn create vite my-vue-app --template vue\n\n# pnpm\npnpm create vite my-vue-app --template vue\n\n# Bun\nbun create vite my-vue-app --template vue\n\n# Deno\ndeno init --npm vite my-vue-app --template vue\n```\n\nCurrently supported template presets include:\n\n- `vanilla`\n- `vanilla-ts`\n- `vue`\n- `vue-ts`\n- `react`\n- `react-compiler`\n- `react-ts`\n- `react-compiler-ts`\n- `preact`\n- `preact-ts`\n- `lit`\n- `lit-ts`\n- `svelte`\n- `svelte-ts`\n- `solid`\n- `solid-ts`\n- `qwik`\n- `qwik-ts`\n\nYou can use `.` for the project name to scaffold in the current directory.\n\n## Community Templates\n\ncreate-vite is a tool to quickly start a project from a basic template for popular frameworks. Check out Awesome Vite for [community maintained templates](https://github.com/vitejs/awesome-vite#templates) that include other tools or target different frameworks. You can use a tool like [tiged](https://github.com/tiged/tiged) to scaffold your project with one of the templates.\n\n```bash\nnpx tiged user/project my-project\ncd my-project\n\nnpm install\nnpm run dev\n```\n","isInternal":false,"tokens":542,"sizeBytes":1958},{"name":"README.md","path":"packages/create-vite/template-qwik-ts/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/create-vite/template-qwik-ts/README.md","title":"template-qwik-ts Documentation","category":"plugin-manifest","format":"markdown","content":"# Qwik + Vite\n\n## Qwik in CSR mode\n\nThis starter is using a pure CSR (Client-Side Rendering) mode. This means, that the application is fully bootstrapped in the browser. Most of Qwik innovations however take advantage of SSR (Server-Side Rendering) mode.\n\n```ts\nexport default defineConfig({\n  plugins: [\n    qwikVite({\n      csr: true,\n    }),\n  ],\n})\n```\n\nUse `npm create qwik@latest` to create a full production ready Qwik application, using SSR and [QwikCity](https://qwik.dev/docs/qwikcity/), our server-side meta-framework.\n\n## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\nLearn more on the [Qwik Website](https://qwik.dev) and join our community on our [Discord](https://qwik.dev/chat)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\n","isInternal":false,"tokens":261,"sizeBytes":997},{"name":"README.md","path":"packages/create-vite/template-qwik/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/create-vite/template-qwik/README.md","title":"template-qwik Documentation","category":"plugin-manifest","format":"markdown","content":"# Qwik + Vite\n\n## Qwik in CSR mode\n\nThis starter is using a pure CSR (Client-Side Rendering) mode. This means, that the application is fully bootstrapped in the browser. Most of Qwik innovations however take advantage of SSR (Server-Side Rendering) mode.\n\n```ts\nexport default defineConfig({\n  plugins: [\n    qwikVite({\n      csr: true,\n    }),\n  ],\n})\n```\n\nUse `npm create qwik@latest` to create a full production ready Qwik application, using SSR and [QwikCity](https://qwik.dev/docs/qwikcity/), our server-side meta-framework.\n\n## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\nLearn more on the [Qwik Website](https://qwik.dev) and join our community on our [Discord](https://qwik.dev/chat)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\n","isInternal":false,"tokens":261,"sizeBytes":997},{"name":"README.md","path":"packages/create-vite/template-react-ts/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/create-vite/template-react-ts/README.md","title":"template-react-ts Documentation","category":"plugin-manifest","format":"markdown","content":"# React + TypeScript + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)\n\n## React Compiler\n\nThe React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).\n\n## Expanding the Oxlint configuration\n\nIf you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`:\n\n```json\n{\n  \"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n  \"plugins\": [\"react\", \"typescript\", \"oxc\"],\n  \"options\": {\n    \"typeAware\": true\n  },\n  \"rules\": {\n    \"react/rules-of-hooks\": \"error\",\n    \"react/only-export-components\": [\"warn\", { \"allowConstantExport\": true }]\n  }\n}\n```\n\nSee the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories.\n","isInternal":false,"tokens":319,"sizeBytes":1278},{"name":"README.md","path":"packages/create-vite/template-react/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/create-vite/template-react/README.md","title":"template-react Documentation","category":"plugin-manifest","format":"markdown","content":"# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)\n\n## React Compiler\n\nThe React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).\n\n## Expanding the Oxlint configuration\n\nIf you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and Oxlint's TypeScript related rules in your project.\n","isInternal":false,"tokens":228,"sizeBytes":1009},{"name":"README.md","path":"packages/create-vite/template-solid-ts/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/create-vite/template-solid-ts/README.md","title":"template-solid-ts Documentation","category":"plugin-manifest","format":"markdown","content":"## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\n### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\nIt correctly bundles Solid in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.<br>\nYour app is ready to be deployed!\n\n## Deployment\n\nLearn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html)\n","isInternal":false,"tokens":195,"sizeBytes":810},{"name":"README.md","path":"packages/create-vite/template-solid/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/create-vite/template-solid/README.md","title":"template-solid Documentation","category":"plugin-manifest","format":"markdown","content":"## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\n### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\nIt correctly bundles Solid in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.<br>\nYour app is ready to be deployed!\n\n## Deployment\n\nLearn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html)\n","isInternal":false,"tokens":195,"sizeBytes":810},{"name":"README.md","path":"packages/create-vite/template-svelte-ts/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/create-vite/template-svelte-ts/README.md","title":"template-svelte-ts Documentation","category":"plugin-manifest","format":"markdown","content":"# Svelte + TS + Vite\n\nThis template should help get you started developing with Svelte and TypeScript in Vite.\n\n## Recommended IDE Setup\n\n[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).\n\n## Need an official Svelte framework?\n\nCheck out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.\n\n## Technical considerations\n\n**Why use this over SvelteKit?**\n\n- It brings its own routing solution which might not be preferable for some users.\n- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.\n\nThis template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.\n\nShould you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.\n\n**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**\n\nSetting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.\n\n**Why include `.vscode/extensions.json`?**\n\nOther templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.\n\n**Why enable `allowJs` in the TS template?**\n\nWhile `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.\n\n**Why is HMR not preserving my local component state?**\n\nHMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).\n\nIf you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.\n\n```ts\n// store.ts\n// An extremely simple external store\nimport { writable } from 'svelte/store'\nexport default writable(0)\n```\n","isInternal":false,"tokens":684,"sizeBytes":3082},{"name":"README.md","path":"packages/create-vite/template-svelte/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/create-vite/template-svelte/README.md","title":"template-svelte Documentation","category":"plugin-manifest","format":"markdown","content":"# Svelte + Vite\n\nThis template should help get you started developing with Svelte in Vite.\n\n## Recommended IDE Setup\n\n[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).\n\n## Need an official Svelte framework?\n\nCheck out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.\n\n## Technical considerations\n\n**Why use this over SvelteKit?**\n\n- It brings its own routing solution which might not be preferable for some users.\n- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.\n\nThis template contains as little as possible to get started with Vite + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.\n\nShould you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.\n\n**Why include `.vscode/extensions.json`?**\n\nOther templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.\n\n**Why enable `checkJs` in the JS template?**\n\nIt is likely that most cases of changing variable types in runtime are likely to be accidental, rather than deliberate. This provides advanced typechecking out of the box. Should you like to take advantage of the dynamically-typed nature of JavaScript, it is trivial to change the configuration.\n\n**Why is HMR not preserving my local component state?**\n\nHMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/sveltejs/svelte-hmr/tree/master/packages/svelte-hmr#preservation-of-local-state).\n\nIf you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.\n\n```js\n// store.js\n// An extremely simple external store\nimport { writable } from 'svelte/store'\nexport default writable(0)\n```\n","isInternal":false,"tokens":563,"sizeBytes":2565},{"name":"README.md","path":"packages/create-vite/template-vue-ts/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/create-vite/template-vue-ts/README.md","title":"template-vue-ts Documentation","category":"plugin-manifest","format":"markdown","content":"# Vue 3 + TypeScript + Vite\n\nThis template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.\n\nLearn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).\n","isInternal":false,"tokens":107,"sizeBytes":442},{"name":"README.md","path":"packages/create-vite/template-vue/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/create-vite/template-vue/README.md","title":"template-vue Documentation","category":"plugin-manifest","format":"markdown","content":"# Vue 3 + Vite\n\nThis template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.\n\nLearn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).\n","isInternal":false,"tokens":102,"sizeBytes":385},{"name":"README.md","path":"packages/plugin-legacy/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/plugin-legacy/README.md","title":"plugin-legacy Documentation","category":"plugin-manifest","format":"markdown","content":"# @vitejs/plugin-legacy [![npm](https://img.shields.io/npm/v/@vitejs/plugin-legacy.svg)](https://npmjs.com/package/@vitejs/plugin-legacy)\n\nVite's minimum browser support target is [native ESM dynamic import](https://caniuse.com/es6-module-dynamic-import), and [`import.meta`](https://caniuse.com/mdn-javascript_operators_import_meta). This plugin provides support for legacy browsers that do not support those features when building for production.\n\nBy default, this plugin will:\n\n- Generate a corresponding legacy chunk for every chunk in the final bundle, transformed with [@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env) and emitted as [SystemJS modules](https://github.com/systemjs/systemjs) (code splitting is still supported!).\n\n- Generate a polyfill chunk including SystemJS runtime, and any necessary polyfills determined by specified browser targets and **actual usage** in the bundle.\n\n- Inject `<script nomodule>` tags into generated HTML to conditionally load the polyfills and legacy bundle only in browsers without widely-available features support.\n\n- Inject the `import.meta.env.LEGACY` env variable, which will only be `true` in the legacy production build, and `false` in all other cases.\n\n## Usage\n\n```js\n// vite.config.js\nimport legacy from '@vitejs/plugin-legacy'\n\nexport default {\n  plugins: [\n    legacy({\n      targets: ['defaults', 'not IE 11'],\n    }),\n  ],\n}\n```\n\n> Terser must be installed for minification when using Vite versions older than 8.1.4 or when [`build.minify`](https://vite.dev/config/build-options#build-minify) is explicitly set to `terser`.\n>\n> ```sh\n> npm add -D terser\n> ```\n\n## Options\n\n### `targets`\n\n- **Type:** `string | string[] | { [key: string]: string }`\n- **Default:** [`'last 2 versions and not dead, > 0.3%, Firefox ESR'`](https://browsersl.ist/#q=last+2+versions+and+not+dead%2C+%3E+0.3%25%2C+Firefox+ESR)\n\n  It's passed on to [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#targets) when rendering **legacy chunks**.\n\n  The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.\n\n  If it's not set, plugin-legacy will load [the browserslist config sources](https://github.com/browserslist/browserslist#queries) and then fallback to the default value.\n\n### `modernTargets`\n\n- **Type:** `string | string[]`\n- **Default:** [`'edge>=105, firefox>=106, chrome>=105, safari>=16.4, chromeAndroid>=105, iOS>=16.4'`](https://browsersl.ist/#q=edge%3E%3D105%2C+firefox%3E%3D106%2C+chrome%3E%3D105%2C+safari%3E%3D16.4%2C+chromeAndroid%3E%3D105%2C+iOS%3E%3D16.4)\n\n  It's passed on to [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#targets) when collecting polyfills for **modern chunks**. The value set here will override the `build.target` option.\n\n  The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.\n\n  If it's not set, plugin-legacy will fallback to the default value.\n\n  Note that this options should not be set unless `renderLegacyChunks` is set to `false`.\n\n### `polyfills`\n\n- **Type:** `boolean | string[]`\n- **Default:** `true`\n\n  By default, a polyfills chunk is generated based on the target browser ranges and actual usage in the final bundle (detected via `@babel/preset-env`'s `useBuiltIns: 'usage'`).\n\n  Set to a list of strings to explicitly control which polyfills to include. See [Polyfill Specifiers](#polyfill-specifiers) for details.\n\n  Set to `false` to avoid generating polyfills and handle it yourself (will still generate legacy chunks with syntax transformations).\n\n### `additionalLegacyPolyfills`\n\n- **Type:** `string[]`\n\n  Add custom imports to the legacy polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option.\n\n### `additionalModernPolyfills`\n\n- **Type:** `string[]`\n\n  Add custom imports to the modern polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option.\n\n### `modernPolyfills`\n\n- **Type:** `boolean | string[]`\n- **Default:** `false`\n\n  Defaults to `false`. Enabling this option will generate a separate polyfills chunk for the modern build (targeting [browsers that support widely-available features](#browsers-that-supports-esm-but-does-not-support-widely-available-features)).\n\n  Set to a list of strings to explicitly control which polyfills to include. See [Polyfill Specifiers](#polyfill-specifiers) for details.\n\n  If `modernTargets` is not set, it is **not recommended** to use the `true` value (which uses auto-detection) because `core-js@3` is very aggressive in polyfill inclusions due to all the bleeding edge features it supports. Even when targeting native ESM support, it injects 15kb of polyfills!\n\n  If you don't have hard reliance on bleeding edge runtime features, it is not that hard to avoid having to use polyfills in the modern build altogether. Alternatively, consider setting `modernTargets` or using an on-demand service like https://cdnjs.cloudflare.com/polyfill/ to only inject necessary polyfills based on actual browser user-agents (most modern browsers will need nothing!).\n\n### `renderLegacyChunks`\n\n- **Type:** `boolean`\n- **Default:** `true`\n\n  Set to `false` to disable legacy chunks. This is only useful if you are using `modernPolyfills`, which essentially allows you to use this plugin for injecting polyfills to the modern build only:\n\n  ```js\n  import legacy from '@vitejs/plugin-legacy'\n\n  export default {\n    plugins: [\n      legacy({\n        modernPolyfills: [/* ... */],\n        renderLegacyChunks: false,\n      }),\n    ],\n  }\n  ```\n\n### `externalSystemJS`\n\n- **Type:** `boolean`\n- **Default:** `false`\n\n  Defaults to `false`. Enabling this option will exclude `systemjs/dist/s.min.js` inside polyfills-legacy chunk.\n\n### `renderModernChunks`\n\n- **Type:** `boolean`\n- **Default:** `true`\n\n  Set to `false` to only output the legacy bundles that support all target browsers.\n\n  This is also useful when running the project locally using `file:` protocol, as loading modern chunks with `type=\"module\"` may trigger CORS restrictions. To avoid this issue, simply set `renderModernChunks` to `false` to exclusively use legacy chunks instead.\n\n## Browsers that supports ESM but does not support widely-available features\n\nThe legacy plugin offers a way to use widely-available features natively in the modern build, while falling back to the legacy build in browsers with native ESM but without those features supported (e.g. Legacy Edge). This feature works by injecting a runtime check and loading the legacy bundle with SystemJS runtime if needed. There are the following drawbacks:\n\n- Modern bundle is downloaded in all ESM browsers\n- Modern bundle throws an error in browsers without those features support\n\nThe following features are considered as widely-available:\n\n- dynamic import\n- async generator\n- `import.meta.resolve`\n\n## Polyfill Specifiers\n\nPolyfill specifier strings for `polyfills` and `modernPolyfills` can be either of the following:\n\n- Any [`core-js` 3 sub import paths](https://unpkg.com/browse/core-js@latest/) - e.g. `es/map` will import `core-js/es/map`\n\n- Any [individual `core-js` 3 modules](https://unpkg.com/browse/core-js@latest/modules/) - e.g. `es.array.iterator` will import `core-js/modules/es.array.iterator.js`\n\n**Example**\n\n```js\nimport legacy from '@vitejs/plugin-legacy'\n\nexport default {\n  plugins: [\n    legacy({\n      polyfills: ['es.promise.finally', 'es/map', 'es/set'],\n      modernPolyfills: ['es.promise.finally'],\n    }),\n  ],\n}\n```\n\n## Content Security Policy\n\nThe legacy plugin requires inline scripts for [Safari 10.1 `nomodule` fix](https://gist.github.com/samthor/64b114e4a4f539915a95b91ffd340acc), SystemJS initialization, and dynamic import fallback. If you have a strict CSP policy requirement, you will need to [add the corresponding hashes to your `script-src` list](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_inline_script).\n\nThe hash values (without the `sha256-` prefix) can be retrieved via:\n\n```js\nimport { cspHashes } from '@vitejs/plugin-legacy'\n```\n\nThe current values are:\n\n- `sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=`\n- `sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=`\n- `sha256-w36slEqa9euNKxfvkw+LLGsDIr++3rsZXpZxtmRh8Aw=`\n- `sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc=`\n\n<!--\nRun `node --input-type=module -e \"import {cspHashes} from '@vitejs/plugin-legacy'; console.log(cspHashes.map(h => 'sha256-'+h))\"` to retrieve the value.\n-->\n\nNote that these values could change between minor versions. Thus, we recommend generating the CSP header from the exported `cspHashes` variable. If you copy the values manually, then you should pin the minor version using `~`.\n\nWhen using the `regenerator-runtime` polyfill, it will attempt to use the `globalThis` object to register itself. If `globalThis` is not available (it is [fairly new](https://caniuse.com/?search=globalThis) and not widely supported, including IE 11), it attempts to perform dynamic `Function(...)` call which violates the CSP. To avoid dynamic `eval` in the absence of `globalThis` consider adding `core-js/proposals/global-this` to `additionalLegacyPolyfills` to define it.\n\n## References\n\n- [Vue CLI modern mode](https://cli.vuejs.org/guide/browser-compatibility.html#modern-mode)\n- [Using Native JavaScript Modules in Production Today](https://philipwalton.com/articles/using-native-javascript-modules-in-production-today/)\n- [rollup-native-modules-boilerplate](https://github.com/philipwalton/rollup-native-modules-boilerplate)\n","isInternal":false,"tokens":2529,"sizeBytes":9965},{"name":"README.md","path":"packages/vite/README.md","rawUrl":"https://raw.githubusercontent.com/vitejs/vite/HEAD/packages/vite/README.md","title":"vite Documentation","category":"plugin-manifest","format":"markdown","content":"# Vite ⚡\n\n> Next Generation Frontend Tooling\n\n- 💡 Instant Server Start\n- ⚡️ Lightning Fast HMR\n- 🛠️ Rich Features\n- 📦 Optimized Build\n- 🔩 Universal Plugin Interface\n- 🔑 Fully Typed APIs\n\nVite (French word for \"quick\", pronounced [`/viːt/`](https://cdn.jsdelivr.net/gh/vitejs/vite@main/docs/public/vite.mp3), like \"veet\") is a build tool that aims to provide a faster and leaner development experience for modern web projects. It consists of two major parts:\n\n- A dev server that provides [rich feature enhancements](https://vite.dev/guide/features) over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), for example extremely fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features#hot-module-replacement).\n\n- A build command that bundles your code with [Rolldown](https://rolldown.rs), pre-configured to output highly optimized static assets for production.\n\nIn addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.html) and [JavaScript API](https://vite.dev/guide/api-javascript.html) with full typing support.\n\n[Read the Docs to Learn More](https://vite.dev).\n","isInternal":false,"tokens":297,"sizeBytes":1179},{"name":".cursorrules","path":".cursorrules (typescript-nodejs-react-vite-cursorrules-prompt-fi.mdc)","rawUrl":"https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/typescript-nodejs-react-vite-cursorrules-prompt-fi.mdc","title":"Awesome Cursorrules: typescript nodejs react vite cursorrules prompt fi","category":"cursor-rule","format":"markdown","content":"---\ndescription: \"Cursor rules for TypeScript development with Node.js, React, and Vite integration.\"\nglobs: **/*\nalwaysApply: false\n---\nYou are an expert in TypeScript, Node.js, React, Vite, TanStack Query, TanStack Router, and Tailwind.\n\nResponse Constraints\n- Do not remove any existing code unless necessary.\n- Do not remove my comments or commented-out code unless necessary.\n- Do not change the formatting of my imports.\n- Do not change the formatting of my code unless important for new functionality.\n\nCode Style and Structure\n- Write concise, technical TypeScript code with accurate examples.\n- Use functional and declarative programming patterns; avoid classes.\n- Prefer iteration and modularization over code duplication.\n- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).\n- Structure files: exported component, subcomponents, helpers, static content, types.\n\nNaming Conventions\n- Use lowercase with dashes for directories (e.g., components/auth-wizard).\n- Favor named exports for components.\n\nTypeScript Usage\n- Use TypeScript for all code; prefer interfaces over types.\n- Avoid enums; use maps instead.\n- Use functional components with TypeScript interfaces.\n\nSyntax and Formatting\n- Use the \"function\" keyword for pure functions.\n- Use curly braces for all conditionals. Favor simplicity over cleverness.\n- Use declarative JSX.\n\nUI and Styling\n- Use Tailwind for components and styling.\n\nPerformance Optimization\n- Look for ways to make things faster:\n  - Use immutable data structures\n  - Use efficient data fetching strategies\n  - Optimize network requests\n  - Use efficient data structures\n  - Use efficient algorithms\n  - Use efficient rendering strategies\n  - Use efficient state management\n","tokens":351,"sizeBytes":1742}],"systemPromptSnippet":"<yakaai_skills repo=\"vitejs/vite\">\n<!-- File: .github/copilot-instructions.md (Tokens: ~377 | Category: copilot-instructions) -->\nThis is a TypeScript project that implements a frontend build tooling called Vite. Please follow these guidelines when contributing:\n\n## Code Standards\n\n- Run `pnpm run lint` to ensure that your code adheres to the code standards.\n- Run `pnpm run format` to format your code.\n- Build: `pnpm run build`\n- Test: `pnpm run test` (uses Vitest and Playwright)\n\n## Repository Structure\n\n- `docs/`: Documentation\n- `packages/create-vite`: The source code for the `create-vite` command\n- `packages/plugin-legacy`: The source code for the `@vitejs/plugin-legacy` plugin\n- `packages/vite`: The source code for the Vite core\n- `playground/`: E2E tests\n\n## PR Guidelines\n\n### PR Title & Commit Messages\n\n- Follow the [commit message convention](./commit-convention.md)\n\n### PR Description\n\n- What does this PR solve? - Clear problem/feature description\n- Why was this approach chosen? - Implementation rationale\n- If this is a new feature, include a convincing reason.\n- If this adds a new config option, verify problem can't be solved with smarter defaults, existing options, or a plugin\n- If this is a bug fix, explain what caused the bug - Link to relevant code if possible\n\n### Code Style & Standards\n\n- Code follows TypeScript best practices\n- Maintains existing code structure and organization\n- Comments explain \"why\", not \"what\"\n\n### Testing\n\n- Prefer unit tests if it can be tested without using mocks\n- E2E tests should be added in the `playground/` directory\n\n### Documentation\n\n- Update documentation for public API changes\n- Documentation changes go in `docs/` folder\n\n### Other Considerations\n\n- No concerning performance impacts\n\n<!-- File: docs/plugins/index.md (Tokens: ~663 | Category: anthropic-skill) -->\n# Plugins\n\n:::tip NOTE\nVite aims to provide out-of-the-box support for common web development patterns. Before searching for a Vite or Compatible Rollup plugin, check out the [Features Guide](../guide/features.md). A lot of the cases where a plugin would be needed in a Rollup project are already covered in Vite.\n:::\n\nCheck out [Using Plugins](../guide/using-plugins) for information on how to use plugins.\n\n## Official Plugins\n\n### [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue)\n\nProvides Vue 3 Single File Components support.\n\n### [@vitejs/plugin-vue-jsx](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue-jsx)\n\nProvides Vue 3 JSX support (via [dedicated Babel transform](https://github.com/vuejs/babel-plugin-jsx)).\n\n### [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react)\n\nProvides React Fast Refresh support via [Oxc Transformer](https://oxc.rs/docs/guide/usage/transformer).\n\n### [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-swc)\n\nReplaces Oxc with [SWC](https://swc.rs/) during development for SWC plugin usage. During production builds, SWC+Oxc Transformer are used when using plugins. For big projects that require custom plugins, cold start and Hot Module Replacement (HMR) can be significantly faster, if the plugin is also available for SWC.\n\n### [@vitejs/plugin-rsc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc)\n\nVite supports [React Server Components (RSC)](https://react.dev/reference/rsc/server-components) through the plugin. It utilizes the [Environment API](/guide/api-environment) to provide low-level primitives that React frameworks can use to integrate RSC features. You can try a minimal standalone RSC application with:\n\n```bash\nnpm create vite@latest -- --template rsc\n```\n\nRead the [plugin documentation](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc) to learn more.\n\n### [@vitejs/plugin-legacy](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy)\n\nProvides legacy browsers support for the production build.\n\n## Community Plugins\n\nCheck out [Vite Plugin Registry](https://registry.vite.dev/plugins) for the list of plugins published to npm.\n\n## Rolldown Built-in Plugins\n\nVite uses [Rolldown](https://rolldown.rs/) under the hood and it provides a few built-in plugins for common use cases.\n\nRead the [Rolldown Built-in Plugins section](https://rolldown.rs/builtin-plugins/) for more information.\n\n## Rolldown / Rollup Plugins\n\n[Vite plugins](../guide/api-plugin) are an extension of Rollup's plugin interface. Check out the [Rollup Plugin Compatibility section](../guide/api-plugin#rolldown-plugin-compatibility) for more information.\n\n<!-- File: packages/create-vite/README.md (Tokens: ~542 | Category: plugin-manifest) -->\n# create-vite <a href=\"https://npmjs.com/package/create-vite\"><img src=\"https://img.shields.io/npm/v/create-vite\" alt=\"npm package\"></a>\n\n## Scaffolding Your First Vite Project\n\n> **Compatibility Note:**\n> Vite requires [Node.js](https://nodejs.org/en/) version 20.19+, 22.12+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.\n\nWith NPM:\n\n```bash\nnpm create vite@latest\n```\n\nWith Yarn:\n\n```bash\nyarn create vite\n```\n\nWith PNPM:\n\n```bash\npnpm create vite\n```\n\nWith Bun:\n\n```bash\nbun create vite\n```\n\nWith Deno:\n\n```bash\ndeno init --npm vite\n```\n\nThen follow the prompts!\n\nYou can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a Vite + Vue project, run:\n\n```bash\n# npm 7+, extra double-dash is needed:\nnpm create vite@latest my-vue-app -- --template vue\n\n# yarn\nyarn create vite my-vue-app --template vue\n\n# pnpm\npnpm create vite my-vue-app --template vue\n\n# Bun\nbun create vite my-vue-app --template vue\n\n# Deno\ndeno init --npm vite my-vue-app --template vue\n```\n\nCurrently supported template presets include:\n\n- `vanilla`\n- `vanilla-ts`\n- `vue`\n- `vue-ts`\n- `react`\n- `react-compiler`\n- `react-ts`\n- `react-compiler-ts`\n- `preact`\n- `preact-ts`\n- `lit`\n- `lit-ts`\n- `svelte`\n- `svelte-ts`\n- `solid`\n- `solid-ts`\n- `qwik`\n- `qwik-ts`\n\nYou can use `.` for the project name to scaffold in the current directory.\n\n## Community Templates\n\ncreate-vite is a tool to quickly start a project from a basic template for popular frameworks. Check out Awesome Vite for [community maintained templates](https://github.com/vitejs/awesome-vite#templates) that include other tools or target different frameworks. You can use a tool like [tiged](https://github.com/tiged/tiged) to scaffold your project with one of the templates.\n\n```bash\nnpx tiged user/project my-project\ncd my-project\n\nnpm install\nnpm run dev\n```\n\n<!-- File: packages/create-vite/template-qwik-ts/README.md (Tokens: ~261 | Category: plugin-manifest) -->\n# Qwik + Vite\n\n## Qwik in CSR mode\n\nThis starter is using a pure CSR (Client-Side Rendering) mode. This means, that the application is fully bootstrapped in the browser. Most of Qwik innovations however take advantage of SSR (Server-Side Rendering) mode.\n\n```ts\nexport default defineConfig({\n  plugins: [\n    qwikVite({\n      csr: true,\n    }),\n  ],\n})\n```\n\nUse `npm create qwik@latest` to create a full production ready Qwik application, using SSR and [QwikCity](https://qwik.dev/docs/qwikcity/), our server-side meta-framework.\n\n## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\nLearn more on the [Qwik Website](https://qwik.dev) and join our community on our [Discord](https://qwik.dev/chat)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\n\n<!-- File: packages/create-vite/template-qwik/README.md (Tokens: ~261 | Category: plugin-manifest) -->\n# Qwik + Vite\n\n## Qwik in CSR mode\n\nThis starter is using a pure CSR (Client-Side Rendering) mode. This means, that the application is fully bootstrapped in the browser. Most of Qwik innovations however take advantage of SSR (Server-Side Rendering) mode.\n\n```ts\nexport default defineConfig({\n  plugins: [\n    qwikVite({\n      csr: true,\n    }),\n  ],\n})\n```\n\nUse `npm create qwik@latest` to create a full production ready Qwik application, using SSR and [QwikCity](https://qwik.dev/docs/qwikcity/), our server-side meta-framework.\n\n## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\nLearn more on the [Qwik Website](https://qwik.dev) and join our community on our [Discord](https://qwik.dev/chat)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\n\n<!-- File: packages/create-vite/template-react-ts/README.md (Tokens: ~319 | Category: plugin-manifest) -->\n# React + TypeScript + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)\n\n## React Compiler\n\nThe React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).\n\n## Expanding the Oxlint configuration\n\nIf you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`:\n\n```json\n{\n  \"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n  \"plugins\": [\"react\", \"typescript\", \"oxc\"],\n  \"options\": {\n    \"typeAware\": true\n  },\n  \"rules\": {\n    \"react/rules-of-hooks\": \"error\",\n    \"react/only-export-components\": [\"warn\", { \"allowConstantExport\": true }]\n  }\n}\n```\n\nSee the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories.\n\n<!-- File: packages/create-vite/template-react/README.md (Tokens: ~228 | Category: plugin-manifest) -->\n# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)\n\n## React Compiler\n\nThe React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).\n\n## Expanding the Oxlint configuration\n\nIf you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and Oxlint's TypeScript related rules in your project.\n\n<!-- File: packages/create-vite/template-solid-ts/README.md (Tokens: ~195 | Category: plugin-manifest) -->\n## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\n### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\nIt correctly bundles Solid in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.<br>\nYour app is ready to be deployed!\n\n## Deployment\n\nLearn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html)\n\n<!-- File: packages/create-vite/template-solid/README.md (Tokens: ~195 | Category: plugin-manifest) -->\n## Usage\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\n### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in the development mode.<br>\nOpen [http://localhost:5173](http://localhost:5173) to view it in the browser.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.<br>\nIt correctly bundles Solid in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.<br>\nYour app is ready to be deployed!\n\n## Deployment\n\nLearn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html)\n\n<!-- File: packages/create-vite/template-svelte-ts/README.md (Tokens: ~684 | Category: plugin-manifest) -->\n# Svelte + TS + Vite\n\nThis template should help get you started developing with Svelte and TypeScript in Vite.\n\n## Recommended IDE Setup\n\n[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).\n\n## Need an official Svelte framework?\n\nCheck out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.\n\n## Technical considerations\n\n**Why use this over SvelteKit?**\n\n- It brings its own routing solution which might not be preferable for some users.\n- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.\n\nThis template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.\n\nShould you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.\n\n**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**\n\nSetting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.\n\n**Why include `.vscode/extensions.json`?**\n\nOther templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.\n\n**Why enable `allowJs` in the TS template?**\n\nWhile `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.\n\n**Why is HMR not preserving my local component state?**\n\nHMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).\n\nIf you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.\n\n```ts\n// store.ts\n// An extremely simple external store\nimport { writable } from 'svelte/store'\nexport default writable(0)\n```\n\n<!-- File: packages/create-vite/template-svelte/README.md (Tokens: ~563 | Category: plugin-manifest) -->\n# Svelte + Vite\n\nThis template should help get you started developing with Svelte in Vite.\n\n## Recommended IDE Setup\n\n[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).\n\n## Need an official Svelte framework?\n\nCheck out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.\n\n## Technical considerations\n\n**Why use this over SvelteKit?**\n\n- It brings its own routing solution which might not be preferable for some users.\n- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.\n\nThis template contains as little as possible to get started with Vite + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.\n\nShould you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.\n\n**Why include `.vscode/extensions.json`?**\n\nOther templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.\n\n**Why enable `checkJs` in the JS template?**\n\nIt is likely that most cases of changing variable types in runtime are likely to be accidental, rather than deliberate. This provides advanced typechecking out of the box. Should you like to take advantage of the dynamically-typed nature of JavaScript, it is trivial to change the configuration.\n\n**Why is HMR not preserving my local component state?**\n\nHMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/sveltejs/svelte-hmr/tree/master/packages/svelte-hmr#preservation-of-local-state).\n\nIf you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.\n\n```js\n// store.js\n// An extremely simple external store\nimport { writable } from 'svelte/store'\nexport default writable(0)\n```\n\n<!-- File: packages/create-vite/template-vue-ts/README.md (Tokens: ~107 | Category: plugin-manifest) -->\n# Vue 3 + TypeScript + Vite\n\nThis template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.\n\nLearn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).\n\n<!-- File: packages/create-vite/template-vue/README.md (Tokens: ~102 | Category: plugin-manifest) -->\n# Vue 3 + Vite\n\nThis template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.\n\nLearn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).\n\n<!-- File: packages/plugin-legacy/README.md (Tokens: ~2529 | Category: plugin-manifest) -->\n# @vitejs/plugin-legacy [![npm](https://img.shields.io/npm/v/@vitejs/plugin-legacy.svg)](https://npmjs.com/package/@vitejs/plugin-legacy)\n\nVite's minimum browser support target is [native ESM dynamic import](https://caniuse.com/es6-module-dynamic-import), and [`import.meta`](https://caniuse.com/mdn-javascript_operators_import_meta). This plugin provides support for legacy browsers that do not support those features when building for production.\n\nBy default, this plugin will:\n\n- Generate a corresponding legacy chunk for every chunk in the final bundle, transformed with [@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env) and emitted as [SystemJS modules](https://github.com/systemjs/systemjs) (code splitting is still supported!).\n\n- Generate a polyfill chunk including SystemJS runtime, and any necessary polyfills determined by specified browser targets and **actual usage** in the bundle.\n\n- Inject `<script nomodule>` tags into generated HTML to conditionally load the polyfills and legacy bundle only in browsers without widely-available features support.\n\n- Inject the `import.meta.env.LEGACY` env variable, which will only be `true` in the legacy production build, and `false` in all other cases.\n\n## Usage\n\n```js\n// vite.config.js\nimport legacy from '@vitejs/plugin-legacy'\n\nexport default {\n  plugins: [\n    legacy({\n      targets: ['defaults', 'not IE 11'],\n    }),\n  ],\n}\n```\n\n> Terser must be installed for minification when using Vite versions older than 8.1.4 or when [`build.minify`](https://vite.dev/config/build-options#build-minify) is explicitly set to `terser`.\n>\n> ```sh\n> npm add -D terser\n> ```\n\n## Options\n\n### `targets`\n\n- **Type:** `string | string[] | { [key: string]: string }`\n- **Default:** [`'last 2 versions and not dead, > 0.3%, Firefox ESR'`](https://browsersl.ist/#q=last+2+versions+and+not+dead%2C+%3E+0.3%25%2C+Firefox+ESR)\n\n  It's passed on to [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#targets) when rendering **legacy chunks**.\n\n  The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.\n\n  If it's not set, plugin-legacy will load [the browserslist config sources](https://github.com/browserslist/browserslist#queries) and then fallback to the default value.\n\n### `modernTargets`\n\n- **Type:** `string | string[]`\n- **Default:** [`'edge>=105, firefox>=106, chrome>=105, safari>=16.4, chromeAndroid>=105, iOS>=16.4'`](https://browsersl.ist/#q=edge%3E%3D105%2C+firefox%3E%3D106%2C+chrome%3E%3D105%2C+safari%3E%3D16.4%2C+chromeAndroid%3E%3D105%2C+iOS%3E%3D16.4)\n\n  It's passed on to [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#targets) when collecting polyfills for **modern chunks**. The value set here will override the `build.target` option.\n\n  The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.\n\n  If it's not set, plugin-legacy will fallback to the default value.\n\n  Note that this options should not be set unless `renderLegacyChunks` is set to `false`.\n\n### `polyfills`\n\n- **Type:** `boolean | string[]`\n- **Default:** `true`\n\n  By default, a polyfills chunk is generated based on the target browser ranges and actual usage in the final bundle (detected via `@babel/preset-env`'s `useBuiltIns: 'usage'`).\n\n  Set to a list of strings to explicitly control which polyfills to include. See [Polyfill Specifiers](#polyfill-specifiers) for details.\n\n  Set to `false` to avoid generating polyfills and handle it yourself (will still generate legacy chunks with syntax transformations).\n\n### `additionalLegacyPolyfills`\n\n- **Type:** `string[]`\n\n  Add custom imports to the legacy polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option.\n\n### `additionalModernPolyfills`\n\n- **Type:** `string[]`\n\n  Add custom imports to the modern polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option.\n\n### `modernPolyfills`\n\n- **Type:** `boolean | string[]`\n- **Default:** `false`\n\n  Defaults to `false`. Enabling this option will generate a separate polyfills chunk for the modern build (targeting [browsers that support widely-available features](#browsers-that-supports-esm-but-does-not-support-widely-available-features)).\n\n  Set to a list of strings to explicitly control which polyfills to include. See [Polyfill Specifiers](#polyfill-specifiers) for details.\n\n  If `modernTargets` is not set, it is **not recommended** to use the `true` value (which uses auto-detection) because `core-js@3` is very aggressive in polyfill inclusions due to all the bleeding edge features it supports. Even when targeting native ESM support, it injects 15kb of polyfills!\n\n  If you don't have hard reliance on bleeding edge runtime features, it is not that hard to avoid having to use polyfills in the modern build altogether. Alternatively, consider setting `modernTargets` or using an on-demand service like https://cdnjs.cloudflare.com/polyfill/ to only inject necessary polyfills based on actual browser user-agents (most modern browsers will need nothing!).\n\n### `renderLegacyChunks`\n\n- **Type:** `boolean`\n- **Default:** `true`\n\n  Set to `false` to disable legacy chunks. This is only useful if you are using `modernPolyfills`, which essentially allows you to use this plugin for injecting polyfills to the modern build only:\n\n  ```js\n  import legacy from '@vitejs/plugin-legacy'\n\n  export default {\n    plugins: [\n      legacy({\n        modernPolyfills: [/* ... */],\n        renderLegacyChunks: false,\n      }),\n    ],\n  }\n  ```\n\n### `externalSystemJS`\n\n- **Type:** `boolean`\n- **Default:** `false`\n\n  Defaults to `false`. Enabling this option will exclude `systemjs/dist/s.min.js` inside polyfills-legacy chunk.\n\n### `renderModernChunks`\n\n- **Type:** `boolean`\n- **Default:** `true`\n\n  Set to `false` to only output the legacy bundles that support all target browsers.\n\n  This is also useful when running the project locally using `file:` protocol, as loading modern chunks with `type=\"module\"` may trigger CORS restrictions. To avoid this issue, simply set `renderModernChunks` to `false` to exclusively use legacy chunks instead.\n\n## Browsers that supports ESM but does not support widely-available features\n\nThe legacy plugin offers a way to use widely-available features natively in the modern build, while falling back to the legacy build in browsers with native ESM but without those features supported (e.g. Legacy Edge). This feature works by injecting a runtime check and loading the legacy bundle with SystemJS runtime if needed. There are the following drawbacks:\n\n- Modern bundle is downloaded in all ESM browsers\n- Modern bundle throws an error in browsers without those features support\n\nThe following features are considered as widely-available:\n\n- dynamic import\n- async generator\n- `import.meta.resolve`\n\n## Polyfill Specifiers\n\nPolyfill specifier strings for `polyfills` and `modernPolyfills` can be either of the following:\n\n- Any [`core-js` 3 sub import paths](https://unpkg.com/browse/core-js@latest/) - e.g. `es/map` will import `core-js/es/map`\n\n- Any [individual `core-js` 3 modules](https://unpkg.com/browse/core-js@latest/modules/) - e.g. `es.array.iterator` will import `core-js/modules/es.array.iterator.js`\n\n**Example**\n\n```js\nimport legacy from '@vitejs/plugin-legacy'\n\nexport default {\n  plugins: [\n    legacy({\n      polyfills: ['es.promise.finally', 'es/map', 'es/set'],\n      modernPolyfills: ['es.promise.finally'],\n    }),\n  ],\n}\n```\n\n## Content Security Policy\n\nThe legacy plugin requires inline scripts for [Safari 10.1 `nomodule` fix](https://gist.github.com/samthor/64b114e4a4f539915a95b91ffd340acc), SystemJS initialization, and dynamic import fallback. If you have a strict CSP policy requirement, you will need to [add the corresponding hashes to your `script-src` list](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_inline_script).\n\nThe hash values (without the `sha256-` prefix) can be retrieved via:\n\n```js\nimport { cspHashes } from '@vitejs/plugin-legacy'\n```\n\nThe current values are:\n\n- `sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=`\n- `sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=`\n- `sha256-w36slEqa9euNKxfvkw+LLGsDIr++3rsZXpZxtmRh8Aw=`\n- `sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc=`\n\n<!--\nRun `node --input-type=module -e \"import {cspHashes} from '@vitejs/plugin-legacy'; console.log(cspHashes.map(h => 'sha256-'+h))\"` to retrieve the value.\n-->\n\nNote that these values could change between minor versions. Thus, we recommend generating the CSP header from the exported `cspHashes` variable. If you copy the values manually, then you should pin the minor version using `~`.\n\nWhen using the `regenerator-runtime` polyfill, it will attempt to use the `globalThis` object to register itself. If `globalThis` is not available (it is [fairly new](https://caniuse.com/?search=globalThis) and not widely supported, including IE 11), it attempts to perform dynamic `Function(...)` call which violates the CSP. To avoid dynamic `eval` in the absence of `globalThis` consider adding `core-js/proposals/global-this` to `additionalLegacyPolyfills` to define it.\n\n## References\n\n- [Vue CLI modern mode](https://cli.vuejs.org/guide/browser-compatibility.html#modern-mode)\n- [Using Native JavaScript Modules in Production Today](https://philipwalton.com/articles/using-native-javascript-modules-in-production-today/)\n- [rollup-native-modules-boilerplate](https://github.com/philipwalton/rollup-native-modules-boilerplate)\n\n<!-- File: packages/vite/README.md (Tokens: ~297 | Category: plugin-manifest) -->\n# Vite ⚡\n\n> Next Generation Frontend Tooling\n\n- 💡 Instant Server Start\n- ⚡️ Lightning Fast HMR\n- 🛠️ Rich Features\n- 📦 Optimized Build\n- 🔩 Universal Plugin Interface\n- 🔑 Fully Typed APIs\n\nVite (French word for \"quick\", pronounced [`/viːt/`](https://cdn.jsdelivr.net/gh/vitejs/vite@main/docs/public/vite.mp3), like \"veet\") is a build tool that aims to provide a faster and leaner development experience for modern web projects. It consists of two major parts:\n\n- A dev server that provides [rich feature enhancements](https://vite.dev/guide/features) over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), for example extremely fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features#hot-module-replacement).\n\n- A build command that bundles your code with [Rolldown](https://rolldown.rs), pre-configured to output highly optimized static assets for production.\n\nIn addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.html) and [JavaScript API](https://vite.dev/guide/api-javascript.html) with full typing support.\n\n[Read the Docs to Learn More](https://vite.dev).\n\n<!-- File: .cursorrules (typescript-nodejs-react-vite-cursorrules-prompt-fi.mdc) (Tokens: ~351 | Category: cursor-rule) -->\n---\ndescription: \"Cursor rules for TypeScript development with Node.js, React, and Vite integration.\"\nglobs: **/*\nalwaysApply: false\n---\nYou are an expert in TypeScript, Node.js, React, Vite, TanStack Query, TanStack Router, and Tailwind.\n\nResponse Constraints\n- Do not remove any existing code unless necessary.\n- Do not remove my comments or commented-out code unless necessary.\n- Do not change the formatting of my imports.\n- Do not change the formatting of my code unless important for new functionality.\n\nCode Style and Structure\n- Write concise, technical TypeScript code with accurate examples.\n- Use functional and declarative programming patterns; avoid classes.\n- Prefer iteration and modularization over code duplication.\n- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).\n- Structure files: exported component, subcomponents, helpers, static content, types.\n\nNaming Conventions\n- Use lowercase with dashes for directories (e.g., components/auth-wizard).\n- Favor named exports for components.\n\nTypeScript Usage\n- Use TypeScript for all code; prefer interfaces over types.\n- Avoid enums; use maps instead.\n- Use functional components with TypeScript interfaces.\n\nSyntax and Formatting\n- Use the \"function\" keyword for pure functions.\n- Use curly braces for all conditionals. Favor simplicity over cleverness.\n- Use declarative JSX.\n\nUI and Styling\n- Use Tailwind for components and styling.\n\nPerformance Optimization\n- Look for ways to make things faster:\n  - Use immutable data structures\n  - Use efficient data fetching strategies\n  - Optimize network requests\n  - Use efficient data structures\n  - Use efficient algorithms\n  - Use efficient rendering strategies\n  - Use efficient state management\n</yakaai_skills>"}