diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 91b3cfd45d7866..ae120b3ae02419 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -78,13 +78,13 @@ body: required: true - label: Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md). required: true - - label: Read the [docs](https://vitejs.dev/guide). + - label: Read the [docs](https://vite.dev/guide). required: true - label: Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate. required: true - label: Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to [vuejs/core](https://github.com/vuejs/core) instead. required: true - - label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/). + - label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vite.dev/). required: true - label: The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug. required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index f85f41ebbd3809..e36d5d53edcd7f 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -7,7 +7,7 @@ contact_links: url: https://github.com/vitejs/vite-plugin-vue/issues/new/choose about: Vue related issues should be reported on the vite-plugin-vue repository. - name: Discord Chat - url: https://chat.vitejs.dev + url: https://chat.vite.dev about: Ask questions and discuss with other Vite users in real time. - name: Questions & Discussions url: https://github.com/vitejs/vite/discussions diff --git a/.github/ISSUE_TEMPLATE/docs.yml b/.github/ISSUE_TEMPLATE/docs.yml index 845070d9e1b34e..ef629b96596663 100644 --- a/.github/ISSUE_TEMPLATE/docs.yml +++ b/.github/ISSUE_TEMPLATE/docs.yml @@ -1,5 +1,5 @@ name: "\U0001F4DA Documentation" -description: Suggest a change or new page to be added to vitejs.dev +description: Suggest a change or new page to be added to vite.dev labels: [documentation] body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index da45736c4c6dde..348a9c731416e8 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -41,7 +41,7 @@ body: required: true - label: Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md). required: true - - label: Read the [docs](https://vitejs.dev/guide). + - label: Read the [docs](https://vite.dev/guide). required: true - label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate. required: true diff --git a/.github/workflows/lock-closed-issues.yml b/.github/workflows/lock-closed-issues.yml index fc3002d6d5d8ab..64b585e7a3f48a 100644 --- a/.github/workflows/lock-closed-issues.yml +++ b/.github/workflows/lock-closed-issues.yml @@ -19,6 +19,6 @@ jobs: #issue-comment: | # This issue has been locked since it has been closed for more than 14 days. # - # If you have found a concrete bug or regression related to it, please open a new [bug report](https://github.com/vitejs/vite/issues/new/choose) with a reproduction against the latest Vite version. If you have any other comments you should join the chat at [Vite Land](https://chat.vitejs.dev) or create a new [discussion](https://github.com/vitejs/vite/discussions). + # If you have found a concrete bug or regression related to it, please open a new [bug report](https://github.com/vitejs/vite/issues/new/choose) with a reproduction against the latest Vite version. If you have any other comments you should join the chat at [Vite Land](https://chat.vite.dev) or create a new [discussion](https://github.com/vitejs/vite/discussions). issue-lock-reason: "" process-only: "issues" diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 8c0ecf5ab85f8c..e357d2b1598ef0 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team by DM at [Vite Land](https://chat.vitejs.dev). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team by DM at [Vite Land](https://chat.vite.dev). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f624e76897e578..1b12842b9d82d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Vite Contributing Guide -Hi! We're really excited that you're interested in contributing to Vite! Before submitting your contribution, please read through the following guide. We also suggest you read the [Project Philosophy](https://vitejs.dev/guide/philosophy) in our documentation. +Hi! We're really excited that you're interested in contributing to Vite! Before submitting your contribution, please read through the following guide. We also suggest you read the [Project Philosophy](https://vite.dev/guide/philosophy) in our documentation. You can use [StackBlitz Codeflow](https://stackblitz.com/codeflow) to fix bugs or implement features. You'll see a Codeflow button on issues to start a PR to fix them. A button will also appear on PRs to review them without needing to check out the branch locally. When using Codeflow, the Vite repository will be cloned for you in an online editor, with the Vite package built in watch mode ready to test your changes. If you'd like to learn more, check out the [Codeflow docs](https://developer.stackblitz.com/codeflow/what-is-codeflow). diff --git a/README.md b/README.md index db366bf065a607..205c4701a52e4f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- - Vite logo + + Vite logo


@@ -9,7 +9,7 @@ node compatibility build status Start new PR in StackBlitz Codeflow - discord chat + discord chat


@@ -26,13 +26,13 @@ Vite (French word for "quick", pronounced [`/vit/`](https://cdn.jsdelivr.net/gh/vitejs/vite@main/docs/public/vite.mp3), like "veet") is a new breed of frontend build tooling that significantly improves the frontend development experience. It consists of two major parts: -- A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vitejs.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vitejs.dev/guide/features.html#hot-module-replacement). +- A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vite.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features.html#hot-module-replacement). -- A [build command](https://vitejs.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production. +- A [build command](https://vite.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production. -In addition, Vite is highly extensible via its [Plugin API](https://vitejs.dev/guide/api-plugin.html) and [JavaScript API](https://vitejs.dev/guide/api-javascript.html) with full typing support. +In 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. -[Read the Docs to Learn More](https://vitejs.dev). +[Read the Docs to Learn More](https://vite.dev). ## Packages diff --git a/docs/.vitepress/buildEnd.config.ts b/docs/.vitepress/buildEnd.config.ts index 7e16ebfb55b1f9..8e0d72b7359849 100644 --- a/docs/.vitepress/buildEnd.config.ts +++ b/docs/.vitepress/buildEnd.config.ts @@ -4,7 +4,7 @@ import { Feed } from 'feed' import type { SiteConfig } from 'vitepress' import { createContentLoader } from 'vitepress' -const siteUrl = 'https://vitejs.dev' +const siteUrl = 'https://vite.dev' const blogUrl = `${siteUrl}/blog` export const buildEnd = async (config: SiteConfig): Promise => { @@ -14,8 +14,8 @@ export const buildEnd = async (config: SiteConfig): Promise => { id: blogUrl, link: blogUrl, language: 'en', - image: 'https://vitejs.dev/og-image.png', - favicon: 'https://vitejs.dev/logo.svg', + image: 'https://vite.dev/og-image.png', + favicon: 'https://vite.dev/logo.svg', copyright: 'Copyright © 2019-present VoidZero Inc. & Vite Contributors', }) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index d1583d5d08886d..6a6fa47a22c52f 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -8,9 +8,9 @@ import { import { buildEnd } from './buildEnd.config' const ogDescription = 'Next Generation Frontend Tooling' -const ogImage = 'https://vitejs.dev/og-image.png' +const ogImage = 'https://vite.dev/og-image.png' const ogTitle = 'Vite' -const ogUrl = 'https://vitejs.dev' +const ogUrl = 'https://vite.dev' // netlify envs const deployURL = process.env.DEPLOY_PRIME_URL || '' @@ -40,15 +40,15 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => { const oldVersions: DefaultTheme.NavItemWithLink[] = [ { text: 'Vite 4 Docs', - link: 'https://v4.vitejs.dev', + link: 'https://v4.vite.dev', }, { text: 'Vite 3 Docs', - link: 'https://v3.vitejs.dev', + link: 'https://v3.vite.dev', }, { text: 'Vite 2 Docs', - link: 'https://v2.vitejs.dev', + link: 'https://v2.vite.dev', }, ] @@ -58,7 +58,7 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => { return [ { text: 'Vite 5 Docs (release)', - link: 'https://vitejs.dev', + link: 'https://vite.dev', }, ...oldVersions, ] @@ -124,12 +124,12 @@ export default defineConfig({ locales: { root: { label: 'English' }, - zh: { label: '简体中文', link: 'https://cn.vitejs.dev' }, - ja: { label: '日本語', link: 'https://ja.vitejs.dev' }, - es: { label: 'Español', link: 'https://es.vitejs.dev' }, - pt: { label: 'Português', link: 'https://pt.vitejs.dev' }, - ko: { label: '한국어', link: 'https://ko.vitejs.dev' }, - de: { label: 'Deutsch', link: 'https://de.vitejs.dev' }, + zh: { label: '简体中文', link: 'https://cn.vite.dev' }, + ja: { label: '日本語', link: 'https://ja.vite.dev' }, + es: { label: 'Español', link: 'https://es.vite.dev' }, + pt: { label: 'Português', link: 'https://pt.vite.dev' }, + ko: { label: '한국어', link: 'https://ko.vite.dev' }, + de: { label: 'Deutsch', link: 'https://de.vite.dev' }, }, themeConfig: { @@ -143,7 +143,7 @@ export default defineConfig({ socialLinks: [ { icon: 'mastodon', link: 'https://elk.zone/m.webtoo.ls/@vite' }, { icon: 'twitter', link: 'https://twitter.com/vite_js' }, - { icon: 'discord', link: 'https://chat.vitejs.dev' }, + { icon: 'discord', link: 'https://chat.vite.dev' }, { icon: 'github', link: 'https://github.com/vitejs/vite' }, ], @@ -188,7 +188,7 @@ export default defineConfig({ }, { text: 'Discord Chat', - link: 'https://chat.vitejs.dev', + link: 'https://chat.vite.dev', }, { text: 'Awesome Vite', diff --git a/docs/blog/announcing-vite2.md b/docs/blog/announcing-vite2.md index 11cd6d52307812..e966c791e8571e 100644 --- a/docs/blog/announcing-vite2.md +++ b/docs/blog/announcing-vite2.md @@ -13,7 +13,7 @@ head: content: Announcing Vite 2.0 - - meta - property: og:url - content: https://vitejs.dev/blog/announcing-vite2 + content: https://vite.dev/blog/announcing-vite2 - - meta - property: og:description content: Vite 2 Release Announcement @@ -33,7 +33,7 @@ Vite (French word for "fast", pronounced `/vit/`) is a new kind of build tool fo To get a sense of how fast Vite is, check out [this video comparison](https://twitter.com/amasad/status/1355379680275128321) of booting up a React application on Repl.it using Vite vs. `create-react-app` (CRA). -If you've never heard of Vite before and would love to learn more about it, check out [the rationale behind the project](https://vitejs.dev/guide/why.html). If you are interested in how Vite differs from other similar tools, check out the [comparisons](https://vitejs.dev/guide/comparisons.html). +If you've never heard of Vite before and would love to learn more about it, check out [the rationale behind the project](https://vite.dev/guide/why.html). If you are interested in how Vite differs from other similar tools, check out the [comparisons](https://vite.dev/guide/comparisons.html). ## What's New in 2.0 @@ -49,7 +49,7 @@ Vite 2.0 takes what we learned along the way and is redesigned from scratch with Inspired by [WMR](https://github.com/preactjs/wmr), the new plugin system extends Rollup's plugin interface and is [compatible with many Rollup plugins](https://vite-rollup-plugins.patak.dev/) out of the box. Plugins can use Rollup-compatible hooks, with additional Vite-specific hooks and properties to adjust Vite-only behavior (e.g. differentiating dev vs. build or custom handling of HMR). -The [programmatic API](https://vitejs.dev/guide/api-javascript.html) has also been greatly improved to facilitate higher level tools / frameworks built on top of Vite. +The [programmatic API](https://vite.dev/guide/api-javascript.html) has also been greatly improved to facilitate higher level tools / frameworks built on top of Vite. ### esbuild Powered Dep Pre-Bundling @@ -65,7 +65,7 @@ Vite treats CSS as a first-class citizen of the module graph and supports the fo ### Server-Side Rendering (SSR) Support -Vite 2.0 ships with [experimental SSR support](https://vitejs.dev/guide/ssr.html). Vite provides APIs to efficiently load and update ESM-based source code in Node.js during development (almost like server-side HMR), and automatically externalizes CommonJS-compatible dependencies to improve development and SSR build speed. The production server can be completely decoupled from Vite, and the same setup can be easily adapted to perform pre-rendering / SSG. +Vite 2.0 ships with [experimental SSR support](https://vite.dev/guide/ssr.html). Vite provides APIs to efficiently load and update ESM-based source code in Node.js during development (almost like server-side HMR), and automatically externalizes CommonJS-compatible dependencies to improve development and SSR build speed. The production server can be completely decoupled from Vite, and the same setup can be easily adapted to perform pre-rendering / SSG. Vite SSR is provided as a low-level feature and we are expecting to see higher level frameworks leveraging it under the hood. @@ -81,4 +81,4 @@ That was a lot of features, but getting started with Vite is simple! You can spi npm init @vitejs/app ``` -Then, check out [the guide](https://vitejs.dev/guide/) to see what Vite provides out of the box. You can also check out the source code on [GitHub](https://github.com/vitejs/vite), follow updates on [Twitter](https://twitter.com/vite_js), or join discussions with other Vite users on our [Discord chat server](http://chat.vitejs.dev/). +Then, check out [the guide](https://vite.dev/guide/) to see what Vite provides out of the box. You can also check out the source code on [GitHub](https://github.com/vitejs/vite), follow updates on [Twitter](https://twitter.com/vite_js), or join discussions with other Vite users on our [Discord chat server](http://chat.vite.dev/). diff --git a/docs/blog/announcing-vite3.md b/docs/blog/announcing-vite3.md index 4f25309ca72f04..efb3be87e94117 100644 --- a/docs/blog/announcing-vite3.md +++ b/docs/blog/announcing-vite3.md @@ -13,10 +13,10 @@ head: content: Announcing Vite 3 - - meta - property: og:image - content: https://vitejs.dev/og-image-announcing-vite3.png + content: https://vite.dev/og-image-announcing-vite3.png - - meta - property: og:url - content: https://vitejs.dev/blog/announcing-vite3 + content: https://vite.dev/blog/announcing-vite3 - - meta - property: og:description content: Vite 3 Release Announcement @@ -29,7 +29,7 @@ head: _July 23, 2022_ - Check out the [Vite 4.0 announcement](./announcing-vite4.md) -In February last year, [Evan You](https://twitter.com/youyuxi) released Vite 2. Since then, its adoption has grown non-stop, reaching more than 1 million npm downloads per week. A sprawling ecosystem rapidly formed after the release. Vite is powering a renewed innovation race in Web frameworks. [Nuxt 3](https://v3.nuxtjs.org/) uses Vite by default. [SvelteKit](https://kit.svelte.dev/), [Astro](https://astro.build/), [Hydrogen](https://hydrogen.shopify.dev/), and [SolidStart](https://docs.solidjs.com/quick-start) are all built with Vite. [Laravel has now decided to use Vite by default](https://laravel.com/docs/9.x/vite). [Vite Ruby](https://vite-ruby.netlify.app/) shows how Vite can improve Rails DX. [Vitest](https://vitest.dev) is making strides as a Vite-native alternative to Jest. Vite is behind [Cypress](https://docs.cypress.io/guides/component-testing/writing-your-first-component-test) and [Playwright](https://playwright.dev/docs/test-components)'s new Component Testing features, Storybook has [Vite as an official builder](https://github.com/storybookjs/builder-vite). And [the list goes on](https://patak.dev/vite/ecosystem.html). Maintainers from most of these projects got involved in improving the Vite core itself, working closely with the Vite [team](https://vitejs.dev/team) and other contributors. +In February last year, [Evan You](https://twitter.com/youyuxi) released Vite 2. Since then, its adoption has grown non-stop, reaching more than 1 million npm downloads per week. A sprawling ecosystem rapidly formed after the release. Vite is powering a renewed innovation race in Web frameworks. [Nuxt 3](https://v3.nuxtjs.org/) uses Vite by default. [SvelteKit](https://kit.svelte.dev/), [Astro](https://astro.build/), [Hydrogen](https://hydrogen.shopify.dev/), and [SolidStart](https://docs.solidjs.com/quick-start) are all built with Vite. [Laravel has now decided to use Vite by default](https://laravel.com/docs/9.x/vite). [Vite Ruby](https://vite-ruby.netlify.app/) shows how Vite can improve Rails DX. [Vitest](https://vitest.dev) is making strides as a Vite-native alternative to Jest. Vite is behind [Cypress](https://docs.cypress.io/guides/component-testing/writing-your-first-component-test) and [Playwright](https://playwright.dev/docs/test-components)'s new Component Testing features, Storybook has [Vite as an official builder](https://github.com/storybookjs/builder-vite). And [the list goes on](https://patak.dev/vite/ecosystem.html). Maintainers from most of these projects got involved in improving the Vite core itself, working closely with the Vite [team](https://vite.dev/team) and other contributors. ![Vite 3 Announcement Cover Image](/og-image-announcing-vite3.png) @@ -38,26 +38,26 @@ Today, 16 months from the v2 launch we are happy to announce the release of Vite Quick links: - [Docs](/) -- [Migration Guide](https://v3.vitejs.dev/guide/migration.html) +- [Migration Guide](https://v3.vite.dev/guide/migration.html) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md#300-2022-07-13) -If you are new to Vite, we recommend reading the [Why Vite Guide](https://vitejs.dev/guide/why.html). Then check out [the Getting Started](https://vitejs.dev/guide/) and [Features guide](https://vitejs.dev/guide/features) to see what Vite provides out of the box. As usual, contributions are welcome at [GitHub](https://github.com/vitejs/vite). More than [600 collaborators](https://github.com/vitejs/vite/graphs/contributors) have helped improve Vite so far. Follow the updates on [Twitter](https://twitter.com/vite_js), or join discussions with other Vite users on our [Discord chat server](http://chat.vitejs.dev/). +If you are new to Vite, we recommend reading the [Why Vite Guide](https://vite.dev/guide/why.html). Then check out [the Getting Started](https://vite.dev/guide/) and [Features guide](https://vite.dev/guide/features) to see what Vite provides out of the box. As usual, contributions are welcome at [GitHub](https://github.com/vitejs/vite). More than [600 collaborators](https://github.com/vitejs/vite/graphs/contributors) have helped improve Vite so far. Follow the updates on [Twitter](https://twitter.com/vite_js), or join discussions with other Vite users on our [Discord chat server](http://chat.vite.dev/). ## New Documentation -Go to [vitejs.dev](https://vitejs.dev) to enjoy the new v3 docs. Vite is now using the new [VitePress](https://vitepress.vuejs.org) default theme, with a stunning dark mode between other features. +Go to [vite.dev](https://vite.dev) to enjoy the new v3 docs. Vite is now using the new [VitePress](https://vitepress.vuejs.org) default theme, with a stunning dark mode between other features. -[![Vite documentation frontpage](../images/v3-docs.png)](https://vitejs.dev) +[![Vite documentation frontpage](../images/v3-docs.png)](https://vite.dev) Several projects in the ecosystem have already migrated to it (see [Vitest](https://vitest.dev), [vite-plugin-pwa](https://vite-plugin-pwa.netlify.app/), and [VitePress](https://vitepress.vuejs.org/) itself). -If you need to access the Vite 2 docs, they will remain online at [v2.vitejs.dev](https://v2.vitejs.dev). There is also a new [main.vitejs.dev](https://main.vitejs.dev) subdomain, where each commit to Vite’s main branch is auto deployed. This is useful when testing beta versions or contributing to the core’s development. +If you need to access the Vite 2 docs, they will remain online at [v2.vite.dev](https://v2.vite.dev). There is also a new [main.vite.dev](https://main.vite.dev) subdomain, where each commit to Vite’s main branch is auto deployed. This is useful when testing beta versions or contributing to the core’s development. There is also now an official Spanish translation, that has been added to the previous Chinese and Japanese translations: -- [简体中文](https://cn.vitejs.dev/) -- [日本語](https://ja.vitejs.dev/) -- [Español](https://es.vitejs.dev/) +- [简体中文](https://cn.vite.dev/) +- [日本語](https://ja.vite.dev/) +- [Español](https://es.vite.dev/) ## Create Vite Starter Templates @@ -185,7 +185,7 @@ Learn more in the [WebAssembly guide](/guide/features.html#webassembly) ### ESM SSR Build by Default -Most SSR frameworks in the ecosystem were already using ESM builds. So, Vite 3 makes ESM the default format for SSR builds. This allows us to streamline previous [SSR externalization heuristics](https://vitejs.dev/guide/ssr.html#ssr-externals), externalizing dependencies by default. +Most SSR frameworks in the ecosystem were already using ESM builds. So, Vite 3 makes ESM the default format for SSR builds. This allows us to streamline previous [SSR externalization heuristics](https://vite.dev/guide/ssr.html#ssr-externals), externalizing dependencies by default. ### Improved Relative Base Support @@ -199,7 +199,7 @@ There are other deploy scenarios where this isn't enough. For example, if the ge ### Esbuild Deps Optimization at Build Time (Experimental) -One of the main differences between dev and build time is how Vite handles dependencies. During build time, [`@rollup/plugin-commonjs`](https://github.com/rollup/plugins/tree/master/packages/commonjs) is used to allow importing CJS only dependencies (like React). When using the dev server, esbuild is used instead to pre-bundle and optimize dependencies, and an inline interop scheme is applied while transforming user code importing CJS deps. During the development of Vite 3, we introduced the changes needed to also allow the use of [esbuild to optimize dependencies during build time](https://v3.vitejs.dev/guide/migration.html#using-esbuild-deps-optimization-at-build-time). [`@rollup/plugin-commonjs`](https://github.com/rollup/plugins/tree/master/packages/commonjs) can then be avoided, making dev and build time work in the same way. +One of the main differences between dev and build time is how Vite handles dependencies. During build time, [`@rollup/plugin-commonjs`](https://github.com/rollup/plugins/tree/master/packages/commonjs) is used to allow importing CJS only dependencies (like React). When using the dev server, esbuild is used instead to pre-bundle and optimize dependencies, and an inline interop scheme is applied while transforming user code importing CJS deps. During the development of Vite 3, we introduced the changes needed to also allow the use of [esbuild to optimize dependencies during build time](https://v3.vite.dev/guide/migration.html#using-esbuild-deps-optimization-at-build-time). [`@rollup/plugin-commonjs`](https://github.com/rollup/plugins/tree/master/packages/commonjs) can then be avoided, making dev and build time work in the same way. Given that Rollup v3 will be out in the next months, and we're going to follow up with another Vite major, we've decided to make this mode optional to reduce v3 scope and give Vite and the ecosystem more time to work out possible issues with the new CJS interop approach during build time. Frameworks may switch to using esbuild deps optimization during build time by default at their own pace before Vite 4. @@ -217,7 +217,7 @@ Vite cares about its publish and install footprint; a fast installation of a new | Vite 3.0.0 | 3.05MB | 17.8MB | | Reduction | -30% | -7% | -In part, this reduction was possible by making some dependencies that most users weren't needing optional. First, [Terser](https://github.com/terser/terser) is no longer installed by default. This dependency was no longer needed since we already made esbuild the default minifier for both JS and CSS in Vite 2. If you use `build.minify: 'terser'`, you'll need to install it (`npm add -D terser`). We also moved [node-forge](https://github.com/digitalbazaar/forge) out of the monorepo, implementing support for automatic https certificate generation as a new plugin: [`@vitejs/plugin-basic-ssl`](https://v3.vitejs.dev/guide/migration.html#automatic-https-certificate-generation). Since this feature only creates untrusted certificates that are not added to the local store, it didn't justify the added size. +In part, this reduction was possible by making some dependencies that most users weren't needing optional. First, [Terser](https://github.com/terser/terser) is no longer installed by default. This dependency was no longer needed since we already made esbuild the default minifier for both JS and CSS in Vite 2. If you use `build.minify: 'terser'`, you'll need to install it (`npm add -D terser`). We also moved [node-forge](https://github.com/digitalbazaar/forge) out of the monorepo, implementing support for automatic https certificate generation as a new plugin: [`@vitejs/plugin-basic-ssl`](https://v3.vite.dev/guide/migration.html#automatic-https-certificate-generation). Since this feature only creates untrusted certificates that are not added to the local store, it didn't justify the added size. ## Bug Fixing @@ -234,7 +234,7 @@ A triaging marathon was spearheaded by [@bluwyoo](https://twitter.com/bluwyoo), - The Modern Browser Baseline now targets browsers which support the [native ES Modules](https://caniuse.com/es6-module), [native ESM dynamic import](https://caniuse.com/es6-module-dynamic-import), and [`import.meta`](https://caniuse.com/mdn-javascript_operators_import_meta) features. - JS file extensions in SSR and library mode now use a valid extension (`js`, `mjs`, or `cjs`) for output JS entries and chunks based on their format and the package type. -Learn more in the [Migration Guide](https://v3.vitejs.dev/guide/migration.html). +Learn more in the [Migration Guide](https://v3.vite.dev/guide/migration.html). ## Upgrades to Vite Core @@ -273,4 +273,4 @@ We'll take the following months to ensure a smooth transition for all the projec The Rollup team is [working on its next major](https://twitter.com/lukastaegert/status/1544186847399743488), to be released in the following months. Once the Rollup plugins ecosystem has time to update, we'll follow up with a new Vite major. This will give us another opportunity to introduce more significant changes this year, which we could take to stabilize some of the experimental features introduced in this release. -If you are interested in helping improve Vite, the best way to get on board is to help with triaging issues. Join [our Discord](https://chat.vitejs.dev) and look for the `#contributing` channel. Or get involved in our `#docs`, `#help` others, or create plugins. We are just getting started. There are many open ideas to keep improving Vite's DX. +If you are interested in helping improve Vite, the best way to get on board is to help with triaging issues. Join [our Discord](https://chat.vite.dev) and look for the `#contributing` channel. Or get involved in our `#docs`, `#help` others, or create plugins. We are just getting started. There are many open ideas to keep improving Vite's DX. diff --git a/docs/blog/announcing-vite4-3.md b/docs/blog/announcing-vite4-3.md index 534a2fdcb41bd6..b725308b4be7d1 100644 --- a/docs/blog/announcing-vite4-3.md +++ b/docs/blog/announcing-vite4-3.md @@ -13,10 +13,10 @@ head: content: Announcing Vite 4.3 - - meta - property: og:image - content: https://vitejs.dev/og-image-announcing-vite4-3.png + content: https://vite.dev/og-image-announcing-vite4-3.png - - meta - property: og:url - content: https://vitejs.dev/blog/announcing-vite4-3 + content: https://vite.dev/blog/announcing-vite4-3 - - meta - property: og:description content: Vite 4.3 Release Announcement @@ -33,7 +33,7 @@ _April 20, 2023_ Quick links: -- Docs: [English](/), [简体中文](https://cn.vitejs.dev/), [日本語](https://ja.vitejs.dev/), [Español](https://es.vitejs.dev/), [Português](https://pt.vitejs.dev/) +- Docs: [English](/), [简体中文](https://cn.vite.dev/), [日本語](https://ja.vite.dev/), [Español](https://es.vite.dev/), [Português](https://pt.vite.dev/) - [Vite 4.3 Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md#430-2023-04-20) ## Performance Improvements @@ -83,7 +83,7 @@ We'll continue to work on Vite's performance. We're working on an official [Benc And [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect) now has more performance-related features to help you identify which plugins or middlewares are the bottleneck for your applications. -Using `vite --profile` (and then pressing `p`) once the page loads will save a CPU profile of the dev server startup. You can open them in an app as [speedscope](https://www.speedscope.app/) to identify performance issues. And you can share your findings with the Vite Team in a [Discussion](https://github.com/vitejs/vite/discussions) or in [Vite's Discord](https://chat.vitejs.dev). +Using `vite --profile` (and then pressing `p`) once the page loads will save a CPU profile of the dev server startup. You can open them in an app as [speedscope](https://www.speedscope.app/) to identify performance issues. And you can share your findings with the Vite Team in a [Discussion](https://github.com/vitejs/vite/discussions) or in [Vite's Discord](https://chat.vite.dev). ## Next Steps diff --git a/docs/blog/announcing-vite4.md b/docs/blog/announcing-vite4.md index 587d439733ab38..f17bca9c879bd2 100644 --- a/docs/blog/announcing-vite4.md +++ b/docs/blog/announcing-vite4.md @@ -13,10 +13,10 @@ head: content: Announcing Vite 4 - - meta - property: og:image - content: https://vitejs.dev/og-image-announcing-vite4.png + content: https://vite.dev/og-image-announcing-vite4.png - - meta - property: og:url - content: https://vitejs.dev/blog/announcing-vite4 + content: https://vite.dev/blog/announcing-vite4 - - meta - property: og:description content: Vite 4 Release Announcement @@ -35,23 +35,23 @@ Vite 3 [was released](./announcing-vite3.md) five months ago. npm downloads per As a showcase of the growth Vite and related projects have experienced, the Vite ecosystem gathered on October 11th at [ViteConf 2022](https://viteconf.org/2022/replay). We saw representatives from the main web framework and tools tell stories of innovation and collaboration. And in a symbolic move, the Rollup team choose that exact day to release [Rollup 3](https://rollupjs.org). -Today, the Vite [team](https://vitejs.dev/team) with the help of our ecosystem partners, is happy to announce the release of Vite 4, powered during build time by Rollup 3. We've worked with the ecosystem to ensure a smooth upgrade path for this new major. Vite is now using [Rollup 3](https://github.com/vitejs/vite/issues/9870), which allowed us to simplify Vite's internal asset handling and has many improvements. See the [Rollup 3 release notes here](https://github.com/rollup/rollup/releases/tag/v3.0.0). +Today, the Vite [team](https://vite.dev/team) with the help of our ecosystem partners, is happy to announce the release of Vite 4, powered during build time by Rollup 3. We've worked with the ecosystem to ensure a smooth upgrade path for this new major. Vite is now using [Rollup 3](https://github.com/vitejs/vite/issues/9870), which allowed us to simplify Vite's internal asset handling and has many improvements. See the [Rollup 3 release notes here](https://github.com/rollup/rollup/releases/tag/v3.0.0). ![Vite 4 Announcement Cover Image](/og-image-announcing-vite4.png) Quick links: - [Docs](/) -- [Migration Guide](https://v4.vitejs.dev/guide/migration.html) +- [Migration Guide](https://v4.vite.dev/guide/migration.html) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md#400-2022-12-09) Docs in other languages: -- [简体中文](https://cn.vitejs.dev/) -- [日本語](https://ja.vitejs.dev/) -- [Español](https://es.vitejs.dev/) +- [简体中文](https://cn.vite.dev/) +- [日本語](https://ja.vite.dev/) +- [Español](https://es.vite.dev/) -If you recently started using Vite, we suggest reading the [Why Vite Guide](https://vitejs.dev/guide/why.html) and checking out [the Getting Started](https://vitejs.dev/guide/) and [Features guide](https://vitejs.dev/guide/features). If you want to get involved, contributions are welcome at [GitHub](https://github.com/vitejs/vite). Almost [700 collaborators](https://github.com/vitejs/vite/graphs/contributors) have contributed to Vite. Follow the updates on [Twitter](https://twitter.com/vite_js) and [Mastodon](https://webtoo.ls/@vite), or join collaborate with others on our [Discord community](http://chat.vitejs.dev/). +If you recently started using Vite, we suggest reading the [Why Vite Guide](https://vite.dev/guide/why.html) and checking out [the Getting Started](https://vite.dev/guide/) and [Features guide](https://vite.dev/guide/features). If you want to get involved, contributions are welcome at [GitHub](https://github.com/vitejs/vite). Almost [700 collaborators](https://github.com/vitejs/vite/graphs/contributors) have contributed to Vite. Follow the updates on [Twitter](https://twitter.com/vite_js) and [Mastodon](https://webtoo.ls/@vite), or join collaborate with others on our [Discord community](http://chat.vite.dev/). ## Start playing with Vite 4 @@ -91,7 +91,7 @@ This double loading could occur since a `.css` file will be emitted and it's lik import stuff from './global.css?inline' ``` -Learn more in the [Migration Guide](https://v4.vitejs.dev/guide/migration.html). +Learn more in the [Migration Guide](https://v4.vite.dev/guide/migration.html). ## Environment Variables @@ -135,6 +135,6 @@ We're also thankful to individuals and companies sponsoring the Vite team, and c ## Next steps -Our immediate focus would be on triaging newly opened issues to avoid disruption by possible regressions. If you would like to get involved and help us improve Vite, we suggest starting with issues triaging. Join [our Discord](https://chat.vitejs.dev) and reach out on the `#contributing` channel. Polish our `#docs` story, and `#help` others. We need to continue to build a helpful and welcoming community for the next wave of users, as Vite's adoption continues to grow. +Our immediate focus would be on triaging newly opened issues to avoid disruption by possible regressions. If you would like to get involved and help us improve Vite, we suggest starting with issues triaging. Join [our Discord](https://chat.vite.dev) and reach out on the `#contributing` channel. Polish our `#docs` story, and `#help` others. We need to continue to build a helpful and welcoming community for the next wave of users, as Vite's adoption continues to grow. There are a lot of open fronts to keep improving the DX of everyone that has chosen Vite to power their frameworks and develop their apps. Onwards! diff --git a/docs/blog/announcing-vite5-1.md b/docs/blog/announcing-vite5-1.md index bc9286bbbfaef7..bbb24a8e927c0a 100644 --- a/docs/blog/announcing-vite5-1.md +++ b/docs/blog/announcing-vite5-1.md @@ -13,10 +13,10 @@ head: content: Announcing Vite 5.1 - - meta - property: og:image - content: https://vitejs.dev/og-image-announcing-vite5-1.png + content: https://vite.dev/og-image-announcing-vite5-1.png - - meta - property: og:url - content: https://vitejs.dev/blog/announcing-vite5-1 + content: https://vite.dev/blog/announcing-vite5-1 - - meta - property: og:description content: Vite 5.1 Release Announcement @@ -35,7 +35,7 @@ Vite 5 [was released](./announcing-vite5.md) last November, and it represented a Quick links: [Docs](/), [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md#510-2024-02-08) -Docs in other languages: [简体中文](https://cn.vitejs.dev/), [日本語](https://ja.vitejs.dev/), [Español](https://es.vitejs.dev/), [Português](https://pt.vitejs.dev/), [한국어](https://ko.vitejs.dev/), [Deutsch](https://de.vitejs.dev/) +Docs in other languages: [简体中文](https://cn.vite.dev/), [日本語](https://ja.vite.dev/), [Español](https://es.vite.dev/), [Português](https://pt.vite.dev/), [한국어](https://ko.vite.dev/), [Deutsch](https://de.vite.dev/) Try Vite 5.1 online in StackBlitz: [vanilla](https://vite.new/vanilla-ts), [vue](https://vite.new/vue-ts), [react](https://vite.new/react-ts), [preact](https://vite.new/preact-ts), [lit](https://vite.new/lit-ts), [svelte](https://vite.new/svelte-ts), [solid](https://vite.new/solid-ts), [qwik](https://vite.new/qwik-ts). @@ -127,7 +127,7 @@ Build-time pre-bundling, an experimental feature added in Vite 3, is removed. Wi ## Get Involved -We are grateful to the [900 contributors to Vite Core](https://github.com/vitejs/vite/graphs/contributors), and the maintainers of plugins, integrations, tools, and translations that keeps pushing the ecosystem forward. If you're enjoying Vite, we invite you to participate and help us. Check out our [Contributing Guide](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md), and jump into [triaging issues](https://github.com/vitejs/vite/issues), [reviewing PRs](https://github.com/vitejs/vite/pulls), answering questions at [GitHub Discussions](https://github.com/vitejs/vite/discussions) and helping others in the community in [Vite Land](https://chat.vitejs.dev). +We are grateful to the [900 contributors to Vite Core](https://github.com/vitejs/vite/graphs/contributors), and the maintainers of plugins, integrations, tools, and translations that keeps pushing the ecosystem forward. If you're enjoying Vite, we invite you to participate and help us. Check out our [Contributing Guide](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md), and jump into [triaging issues](https://github.com/vitejs/vite/issues), [reviewing PRs](https://github.com/vitejs/vite/pulls), answering questions at [GitHub Discussions](https://github.com/vitejs/vite/discussions) and helping others in the community in [Vite Land](https://chat.vite.dev). ## Acknowledgments diff --git a/docs/blog/announcing-vite5.md b/docs/blog/announcing-vite5.md index dd4c1d46a275b0..063463825393a1 100644 --- a/docs/blog/announcing-vite5.md +++ b/docs/blog/announcing-vite5.md @@ -13,10 +13,10 @@ head: content: Announcing Vite 5 - - meta - property: og:image - content: https://vitejs.dev/og-image-announcing-vite5.png + content: https://vite.dev/og-image-announcing-vite5.png - - meta - property: og:url - content: https://vitejs.dev/blog/announcing-vite5 + content: https://vite.dev/blog/announcing-vite5 - - meta - property: og:description content: Vite 5 Release Announcement @@ -49,16 +49,16 @@ Quick links: Docs in other languages: -- [简体中文](https://cn.vitejs.dev/) -- [日本語](https://ja.vitejs.dev/) -- [Español](https://es.vitejs.dev/) -- [Português](https://pt.vitejs.dev/) -- [한국어](https://ko.vitejs.dev/) -- [Deutsch](https://de.vitejs.dev/) (new translation!) +- [简体中文](https://cn.vite.dev/) +- [日本語](https://ja.vite.dev/) +- [Español](https://es.vite.dev/) +- [Português](https://pt.vite.dev/) +- [한국어](https://ko.vite.dev/) +- [Deutsch](https://de.vite.dev/) (new translation!) If you're new to Vite, we suggest reading first the [Getting Started](/guide/) and [Features](/guide/features) guides. -We appreciate the more than [850 contributors to Vite Core](https://github.com/vitejs/vite/graphs/contributors), and the maintainers and contributors of Vite plugins, integrations, tools, and translations that have helped us reach here. We encourage you to get involved and continue to improve Vite with us. You can learn more at our [Contributing Guide](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md). To get started, we recommend [triaging issues](https://github.com/vitejs/vite/issues), [reviewing PRs](https://github.com/vitejs/vite/pulls), sending failing tests PRs based on open issues, and helping others in [Discussions](https://github.com/vitejs/vite/discussions) and Vite Land's [help forum](https://discord.com/channels/804011606160703521/1019670660856942652). You'll learn a lot along the way and have a smooth path to further contributions to the project. If you have doubts, join us on our [Discord community](http://chat.vitejs.dev/) and say hi on the [#contributing channel](https://discord.com/channels/804011606160703521/804439875226173480). +We appreciate the more than [850 contributors to Vite Core](https://github.com/vitejs/vite/graphs/contributors), and the maintainers and contributors of Vite plugins, integrations, tools, and translations that have helped us reach here. We encourage you to get involved and continue to improve Vite with us. You can learn more at our [Contributing Guide](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md). To get started, we recommend [triaging issues](https://github.com/vitejs/vite/issues), [reviewing PRs](https://github.com/vitejs/vite/pulls), sending failing tests PRs based on open issues, and helping others in [Discussions](https://github.com/vitejs/vite/discussions) and Vite Land's [help forum](https://discord.com/channels/804011606160703521/1019670660856942652). You'll learn a lot along the way and have a smooth path to further contributions to the project. If you have doubts, join us on our [Discord community](http://chat.vite.dev/) and say hi on the [#contributing channel](https://discord.com/channels/804011606160703521/804439875226173480). To stay up to date, follow us on [X](https://twitter.com/vite_js) or [Mastodon](https://webtoo.ls/@vite). @@ -74,7 +74,7 @@ Vite no longer supports Node.js 14 / 16 / 17 / 19, which reached its EOL. Node.j ## Performance -On top of Rollup 4's build performance improvements, there is a new guide to help you identify and fix common performance issues at [https://vitejs.dev/guide/performance](/guide/performance). +On top of Rollup 4's build performance improvements, there is a new guide to help you identify and fix common performance issues at [https://vite.dev/guide/performance](/guide/performance). Vite 5 also introduces [server.warmup](/guide/performance.html#warm-up-frequently-used-files), a new feature to improve startup time. It lets you define a list of modules that should be pre-transformed as soon as the server starts. When using [`--open` or `server.open`](/config/server-options.html#server-open), Vite will also automatically warm up the entry point of your app or the provided URL to open. diff --git a/docs/config/server-options.md b/docs/config/server-options.md index eaf63a45a71443..4c46e13835f39c 100644 --- a/docs/config/server-options.md +++ b/docs/config/server-options.md @@ -166,7 +166,7 @@ Check out [`vite-setup-catalogue`](https://github.com/sapphi-red/vite-setup-cata With the default configuration, reverse proxies in front of Vite are expected to support proxying WebSocket. If the Vite HMR client fails to connect WebSocket, the client will fall back to connecting the WebSocket directly to the Vite HMR server bypassing the reverse proxies: ``` -Direct websocket connection fallback. Check out https://vitejs.dev/config/server-options.html#server-hmr to remove the previous connection error. +Direct websocket connection fallback. Check out https://vite.dev/config/server-options.html#server-hmr to remove the previous connection error. ``` The error that appears in the Browser when the fallback happens can be ignored. To avoid the error by directly bypassing reverse proxies, you could either: diff --git a/docs/guide/api-plugin.md b/docs/guide/api-plugin.md index 9f0d8894f9c5ec..b8ef5fb2cc697e 100644 --- a/docs/guide/api-plugin.md +++ b/docs/guide/api-plugin.md @@ -6,9 +6,9 @@ Vite plugins extends Rollup's well-designed plugin interface with a few extra Vi ## Authoring a Plugin -Vite strives to offer established patterns out of the box, so before creating a new plugin make sure that you check the [Features guide](https://vitejs.dev/guide/features) to see if your need is covered. Also review available community plugins, both in the form of a [compatible Rollup plugin](https://github.com/rollup/awesome) and [Vite Specific plugins](https://github.com/vitejs/awesome-vite#plugins) +Vite strives to offer established patterns out of the box, so before creating a new plugin make sure that you check the [Features guide](https://vite.dev/guide/features) to see if your need is covered. Also review available community plugins, both in the form of a [compatible Rollup plugin](https://github.com/rollup/awesome) and [Vite Specific plugins](https://github.com/vitejs/awesome-vite#plugins) -When creating a plugin, you can inline it in your `vite.config.js`. There is no need to create a new package for it. Once you see that a plugin was useful in your projects, consider sharing it to help others [in the ecosystem](https://chat.vitejs.dev). +When creating a plugin, you can inline it in your `vite.config.js`. There is no need to create a new package for it. Once you see that a plugin was useful in your projects, consider sharing it to help others [in the ecosystem](https://chat.vite.dev). ::: tip When learning, debugging, or authoring plugins, we suggest including [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect) in your project. It allows you to inspect the intermediate state of Vite plugins. After installing, you can visit `localhost:5173/__inspect/` to inspect the modules and transformation stack of your project. Check out install instructions in the [vite-plugin-inspect docs](https://github.com/antfu/vite-plugin-inspect). diff --git a/docs/guide/comparisons.md b/docs/guide/comparisons.md index e933b3fba70570..7d308d17e2ebcc 100644 --- a/docs/guide/comparisons.md +++ b/docs/guide/comparisons.md @@ -18,4 +18,4 @@ Overall, Vite is a more opinionated / higher-level tool that aims to provide a m [Snowpack](https://www.snowpack.dev/) was also a no-bundle native ESM dev server, very similar in scope to Vite. The project is no longer being maintained. The Snowpack team is now working on [Astro](https://astro.build/), a static site builder powered by Vite. The Astro team is now an active player in the ecosystem, and they are helping to improve Vite. -Aside from different implementation details, the two projects shared a lot in terms of technical advantages over traditional tooling. Vite's dependency pre-bundling is also inspired by Snowpack v1 (now [`esinstall`](https://github.com/snowpackjs/snowpack/tree/main/esinstall)). Some of the main differences between the two projects are listed in [the v2 Comparisons Guide](https://v2.vitejs.dev/guide/comparisons). +Aside from different implementation details, the two projects shared a lot in terms of technical advantages over traditional tooling. Vite's dependency pre-bundling is also inspired by Snowpack v1 (now [`esinstall`](https://github.com/snowpackjs/snowpack/tree/main/esinstall)). Some of the main differences between the two projects are listed in [the v2 Comparisons Guide](https://v2.vite.dev/guide/comparisons). diff --git a/docs/guide/features.md b/docs/guide/features.md index 2decd3b0b93eaf..c2b4f12f2f3699 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -499,7 +499,7 @@ const modules = { #### Custom Queries -You can also use the `query` option to provide queries to imports, for example, to import assets [as a string](https://vitejs.dev/guide/assets.html#importing-asset-as-string) or [as a url](https://vitejs.dev/guide/assets.html#importing-asset-as-url): +You can also use the `query` option to provide queries to imports, for example, to import assets [as a string](https://vite.dev/guide/assets.html#importing-asset-as-string) or [as a url](https://vite.dev/guide/assets.html#importing-asset-as-url): ```ts twoslash import 'vite/client' diff --git a/docs/guide/index.md b/docs/guide/index.md index 9f2b3457ce2dfc..65f9b6c155d00e 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -217,4 +217,4 @@ Then go to your Vite based project and run `pnpm link --global vite` (or the pac ## Community -If you have questions or need help, reach out to the community at [Discord](https://chat.vitejs.dev) and [GitHub Discussions](https://github.com/vitejs/vite/discussions). +If you have questions or need help, reach out to the community at [Discord](https://chat.vite.dev) and [GitHub Discussions](https://github.com/vitejs/vite/discussions). diff --git a/docs/guide/migration.md b/docs/guide/migration.md index 4983099c55bcf1..003b31f4b4cd3b 100644 --- a/docs/guide/migration.md +++ b/docs/guide/migration.md @@ -12,4 +12,4 @@ The experimental Vite Runtime API evolved into the Module Runner API, released i ## Migration from v4 -Check the [Migration from v4 Guide](https://v5.vitejs.dev/guide/migration.html) in the Vite v5 docs first to see the needed changes to port your app to Vite 5, and then proceed with the changes on this page. +Check the [Migration from v4 Guide](https://v5.vite.dev/guide/migration.html) in the Vite v5 docs first to see the needed changes to port your app to Vite 5, and then proceed with the changes on this page. diff --git a/docs/guide/performance.md b/docs/guide/performance.md index 5d19e102ba2526..847a4d206b482a 100644 --- a/docs/guide/performance.md +++ b/docs/guide/performance.md @@ -29,7 +29,7 @@ However, the performance of community plugins is out of Vite's control, which ma You can inspect the duration it takes to transform a file using `vite --debug plugin-transform` or [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect). Note that as asynchronous operations tend to provide inaccurate timings, you should treat the numbers as a rough estimate, but it should still reveal the more expensive operations. ::: tip Profiling -You can run `vite --profile`, visit the site, and press `p + enter` in your terminal to record a `.cpuprofile`. A tool like [speedscope](https://www.speedscope.app) can then be used to inspect the profile and identify the bottlenecks. You can also [share the profiles](https://chat.vitejs.dev) with the Vite team to help us identify performance issues. +You can run `vite --profile`, visit the site, and press `p + enter` in your terminal to record a `.cpuprofile`. A tool like [speedscope](https://www.speedscope.app) can then be used to inspect the profile and identify the bottlenecks. You can also [share the profiles](https://chat.vite.dev) with the Vite team to help us identify performance issues. ::: ## Reduce Resolve Operations diff --git a/docs/guide/philosophy.md b/docs/guide/philosophy.md index 307d1dc3f12ef2..9e4012825435bc 100644 --- a/docs/guide/philosophy.md +++ b/docs/guide/philosophy.md @@ -24,4 +24,4 @@ Although Vite can be used by users directly, it shines as a tool to create frame ## An Active Ecosystem -Vite evolution is a cooperation between framework and plugin maintainers, users, and the Vite team. We encourage active participation in Vite's Core development once a project adopts Vite. We work closely with the main projects in the ecosystem to minimize regressions on each release, aided by tools like [vite-ecosystem-ci](https://github.com/vitejs/vite-ecosystem-ci). It allows us to run the CI of major projects using Vite on selected PRs and gives us a clear status of how the Ecosystem would react to a release. We strive to fix regressions before they hit users and allow projects to update to the next versions as soon as they are released. If you are working with Vite, we invite you to join [Vite's Discord](https://chat.vitejs.dev) and get involved in the project too. +Vite evolution is a cooperation between framework and plugin maintainers, users, and the Vite team. We encourage active participation in Vite's Core development once a project adopts Vite. We work closely with the main projects in the ecosystem to minimize regressions on each release, aided by tools like [vite-ecosystem-ci](https://github.com/vitejs/vite-ecosystem-ci). It allows us to run the CI of major projects using Vite on selected PRs and gives us a clear status of how the Ecosystem would react to a release. We strive to fix regressions before they hit users and allow projects to update to the next versions as soon as they are released. If you are working with Vite, we invite you to join [Vite's Discord](https://chat.vite.dev) and get involved in the project too. diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index 2b20b0c680bae4..7386a7cead4b21 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -2,7 +2,7 @@ See [Rollup's troubleshooting guide](https://rollupjs.org/troubleshooting/) for more information too. -If the suggestions here don't work, please try posting questions on [GitHub Discussions](https://github.com/vitejs/vite/discussions) or in the `#help` channel of [Vite Land Discord](https://chat.vitejs.dev). +If the suggestions here don't work, please try posting questions on [GitHub Discussions](https://github.com/vitejs/vite/discussions) or in the `#help` channel of [Vite Land Discord](https://chat.vite.dev). ## CJS @@ -123,7 +123,7 @@ Or, by importing it into the Keychain Access app and updating the trust of your When the server / WebSocket server receives a large HTTP header, the request will be dropped and the following warning will be shown. -> Server responded with status code 431. See https://vitejs.dev/guide/troubleshooting.html#_431-request-header-fields-too-large. +> Server responded with status code 431. See https://vite.dev/guide/troubleshooting.html#_431-request-header-fields-too-large. This is because Node.js limits request header size to mitigate [CVE-2018-12121](https://www.cve.org/CVERecord?id=CVE-2018-12121). diff --git a/docs/releases.md b/docs/releases.md index f2380be5ab095f..662a8e2f9dcb33 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -26,7 +26,7 @@ As an example, if the Vite latest is at 5.3.10: - Security patches are also backported to `vite@3`, and `vite@5.1`. - `vite@2` and `vite@5.0` are no longer supported. Users should upgrade to receive updates. -We recommend updating Vite regularly. Check out the [Migration Guides](https://vitejs.dev/guide/migration.html) when you update to each Major. The Vite team works closely with the main projects in the ecosystem to ensure the quality of new versions. We test new Vite versions before releasing them through the [vite-ecosystem-ci project](https://github.com/vitejs/vite-ecosystem-ci). Most projects using Vite should be able to quickly offer support or migrate to new versions as soon as they are released. +We recommend updating Vite regularly. Check out the [Migration Guides](https://vite.dev/guide/migration.html) when you update to each Major. The Vite team works closely with the main projects in the ecosystem to ensure the quality of new versions. We test new Vite versions before releasing them through the [vite-ecosystem-ci project](https://github.com/vitejs/vite-ecosystem-ci). Most projects using Vite should be able to quickly offer support or migrate to new versions as soon as they are released. ## Semantic Versioning Edge Cases @@ -54,7 +54,7 @@ Pre-releases allow early adopters and maintainers from the Ecosystem to do integ ## Deprecations -We periodically deprecate features that have been superseded by better alternatives in Minor releases. Deprecated features will continue to work with a type or logged warning. They will be removed in the next major release after entering deprecated status. The [Migration Guide](https://vitejs.dev/guide/migration.html) for each major will list these removals and document an upgrade path for them. +We periodically deprecate features that have been superseded by better alternatives in Minor releases. Deprecated features will continue to work with a type or logged warning. They will be removed in the next major release after entering deprecated status. The [Migration Guide](https://vite.dev/guide/migration.html) for each major will list these removals and document an upgrade path for them. ## Experimental Features diff --git a/packages/create-vite/template-lit-ts/src/my-element.ts b/packages/create-vite/template-lit-ts/src/my-element.ts index 88b188f6d0d9b0..02f0a5f9bd87eb 100644 --- a/packages/create-vite/template-lit-ts/src/my-element.ts +++ b/packages/create-vite/template-lit-ts/src/my-element.ts @@ -26,7 +26,7 @@ export class MyElement extends LitElement { render() { return html`
- + diff --git a/packages/create-vite/template-lit/src/my-element.js b/packages/create-vite/template-lit/src/my-element.js index 8d1ba56442deff..ce047c9160563b 100644 --- a/packages/create-vite/template-lit/src/my-element.js +++ b/packages/create-vite/template-lit/src/my-element.js @@ -32,7 +32,7 @@ export class MyElement extends LitElement { render() { return html`
- + diff --git a/packages/create-vite/template-preact-ts/src/app.tsx b/packages/create-vite/template-preact-ts/src/app.tsx index 5860cb5bb139c0..81196fe97fb0a9 100644 --- a/packages/create-vite/template-preact-ts/src/app.tsx +++ b/packages/create-vite/template-preact-ts/src/app.tsx @@ -9,7 +9,7 @@ export function App() { return ( <>
- + diff --git a/packages/create-vite/template-preact-ts/vite.config.ts b/packages/create-vite/template-preact-ts/vite.config.ts index 29b326faf09c97..b995c32c50b499 100644 --- a/packages/create-vite/template-preact-ts/vite.config.ts +++ b/packages/create-vite/template-preact-ts/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import preact from '@preact/preset-vite' -// https://vitejs.dev/config/ +// https://vite.dev/config/ export default defineConfig({ plugins: [preact()], }) diff --git a/packages/create-vite/template-preact/src/app.jsx b/packages/create-vite/template-preact/src/app.jsx index e8104922fc420c..a2e3363dc380de 100644 --- a/packages/create-vite/template-preact/src/app.jsx +++ b/packages/create-vite/template-preact/src/app.jsx @@ -9,7 +9,7 @@ export function App() { return ( <>
- + diff --git a/packages/create-vite/template-preact/vite.config.js b/packages/create-vite/template-preact/vite.config.js index 29b326faf09c97..b995c32c50b499 100644 --- a/packages/create-vite/template-preact/vite.config.js +++ b/packages/create-vite/template-preact/vite.config.js @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import preact from '@preact/preset-vite' -// https://vitejs.dev/config/ +// https://vite.dev/config/ export default defineConfig({ plugins: [preact()], }) diff --git a/packages/create-vite/template-qwik-ts/src/app.tsx b/packages/create-vite/template-qwik-ts/src/app.tsx index 3acdaacda30749..eb5f388475ba4f 100644 --- a/packages/create-vite/template-qwik-ts/src/app.tsx +++ b/packages/create-vite/template-qwik-ts/src/app.tsx @@ -10,7 +10,7 @@ export const App = component$(() => { return ( <>
- + diff --git a/packages/create-vite/template-qwik-ts/vite.config.ts b/packages/create-vite/template-qwik-ts/vite.config.ts index cabd66b013a920..8c07d8ff7af2e2 100644 --- a/packages/create-vite/template-qwik-ts/vite.config.ts +++ b/packages/create-vite/template-qwik-ts/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import { qwikVite } from '@builder.io/qwik/optimizer' -// https://vitejs.dev/config/ +// https://vite.dev/config/ export default defineConfig({ plugins: [ qwikVite({ diff --git a/packages/create-vite/template-qwik/src/app.jsx b/packages/create-vite/template-qwik/src/app.jsx index 659d065fe5362b..fabe4c9e1a54ab 100644 --- a/packages/create-vite/template-qwik/src/app.jsx +++ b/packages/create-vite/template-qwik/src/app.jsx @@ -10,7 +10,7 @@ export const App = component$(() => { return ( <>
- + diff --git a/packages/create-vite/template-qwik/vite.config.js b/packages/create-vite/template-qwik/vite.config.js index cabd66b013a920..8c07d8ff7af2e2 100644 --- a/packages/create-vite/template-qwik/vite.config.js +++ b/packages/create-vite/template-qwik/vite.config.js @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import { qwikVite } from '@builder.io/qwik/optimizer' -// https://vitejs.dev/config/ +// https://vite.dev/config/ export default defineConfig({ plugins: [ qwikVite({ diff --git a/packages/create-vite/template-react-ts/src/App.tsx b/packages/create-vite/template-react-ts/src/App.tsx index afe48ac750194a..3d7ded3ff62424 100644 --- a/packages/create-vite/template-react-ts/src/App.tsx +++ b/packages/create-vite/template-react-ts/src/App.tsx @@ -9,7 +9,7 @@ function App() { return ( <>
- + Vite logo diff --git a/packages/create-vite/template-react-ts/vite.config.ts b/packages/create-vite/template-react-ts/vite.config.ts index 5a33944a9b41b5..8b0f57b91aeb45 100644 --- a/packages/create-vite/template-react-ts/vite.config.ts +++ b/packages/create-vite/template-react-ts/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' -// https://vitejs.dev/config/ +// https://vite.dev/config/ export default defineConfig({ plugins: [react()], }) diff --git a/packages/create-vite/template-react/src/App.jsx b/packages/create-vite/template-react/src/App.jsx index b8b8473a3696b4..f67355ae04c400 100644 --- a/packages/create-vite/template-react/src/App.jsx +++ b/packages/create-vite/template-react/src/App.jsx @@ -9,7 +9,7 @@ function App() { return ( <>
- + Vite logo diff --git a/packages/create-vite/template-react/vite.config.js b/packages/create-vite/template-react/vite.config.js index 5a33944a9b41b5..8b0f57b91aeb45 100644 --- a/packages/create-vite/template-react/vite.config.js +++ b/packages/create-vite/template-react/vite.config.js @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' -// https://vitejs.dev/config/ +// https://vite.dev/config/ export default defineConfig({ plugins: [react()], }) diff --git a/packages/create-vite/template-solid-ts/README.md b/packages/create-vite/template-solid-ts/README.md index 99613fc0a5d37f..167c567952a23f 100644 --- a/packages/create-vite/template-solid-ts/README.md +++ b/packages/create-vite/template-solid-ts/README.md @@ -25,4 +25,4 @@ Your app is ready to be deployed! ## Deployment -Learn more about deploying your application with the [documentations](https://vitejs.dev/guide/static-deploy.html) +Learn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html) diff --git a/packages/create-vite/template-solid-ts/src/App.tsx b/packages/create-vite/template-solid-ts/src/App.tsx index 93e250bf04b172..bacc16a6adfd1c 100644 --- a/packages/create-vite/template-solid-ts/src/App.tsx +++ b/packages/create-vite/template-solid-ts/src/App.tsx @@ -9,7 +9,7 @@ function App() { return ( <>
- + diff --git a/packages/create-vite/template-solid/README.md b/packages/create-vite/template-solid/README.md index 99613fc0a5d37f..167c567952a23f 100644 --- a/packages/create-vite/template-solid/README.md +++ b/packages/create-vite/template-solid/README.md @@ -25,4 +25,4 @@ Your app is ready to be deployed! ## Deployment -Learn more about deploying your application with the [documentations](https://vitejs.dev/guide/static-deploy.html) +Learn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html) diff --git a/packages/create-vite/template-solid/src/App.jsx b/packages/create-vite/template-solid/src/App.jsx index 63b8025d125f09..b3812f9b8f821c 100644 --- a/packages/create-vite/template-solid/src/App.jsx +++ b/packages/create-vite/template-solid/src/App.jsx @@ -9,7 +9,7 @@ function App() { return ( <>
- + diff --git a/packages/create-vite/template-svelte-ts/src/App.svelte b/packages/create-vite/template-svelte-ts/src/App.svelte index e8b590f1f50599..f75b68aa25d9c7 100644 --- a/packages/create-vite/template-svelte-ts/src/App.svelte +++ b/packages/create-vite/template-svelte-ts/src/App.svelte @@ -6,7 +6,7 @@
- + diff --git a/packages/create-vite/template-svelte-ts/vite.config.ts b/packages/create-vite/template-svelte-ts/vite.config.ts index d70196943d0d24..d32eba1d63fd99 100644 --- a/packages/create-vite/template-svelte-ts/vite.config.ts +++ b/packages/create-vite/template-svelte-ts/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import { svelte } from '@sveltejs/vite-plugin-svelte' -// https://vitejs.dev/config/ +// https://vite.dev/config/ export default defineConfig({ plugins: [svelte()], }) diff --git a/packages/create-vite/template-svelte/src/App.svelte b/packages/create-vite/template-svelte/src/App.svelte index 1f31354ec8cfeb..4e67b2709f0624 100644 --- a/packages/create-vite/template-svelte/src/App.svelte +++ b/packages/create-vite/template-svelte/src/App.svelte @@ -6,7 +6,7 @@
- + diff --git a/packages/create-vite/template-svelte/vite.config.js b/packages/create-vite/template-svelte/vite.config.js index d70196943d0d24..d32eba1d63fd99 100644 --- a/packages/create-vite/template-svelte/vite.config.js +++ b/packages/create-vite/template-svelte/vite.config.js @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import { svelte } from '@sveltejs/vite-plugin-svelte' -// https://vitejs.dev/config/ +// https://vite.dev/config/ export default defineConfig({ plugins: [svelte()], }) diff --git a/packages/create-vite/template-vanilla-ts/src/main.ts b/packages/create-vite/template-vanilla-ts/src/main.ts index 791547b0d382f5..6396b50a2321dd 100644 --- a/packages/create-vite/template-vanilla-ts/src/main.ts +++ b/packages/create-vite/template-vanilla-ts/src/main.ts @@ -5,7 +5,7 @@ import { setupCounter } from './counter.ts' document.querySelector('#app')!.innerHTML = `