diff --git a/.vitepress/buildEnd.config.ts b/.vitepress/buildEnd.config.ts index 7e16ebfb..8e0d72b7 100644 --- a/.vitepress/buildEnd.config.ts +++ b/.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/.vitepress/config.ts b/.vitepress/config.ts index 3f266cd6..6d43ed89 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -10,7 +10,7 @@ import { buildEnd } from './buildEnd.config' const ogDescription = '次世代フロントエンドツール' const ogImage = 'https://vite.dev/og-image.jpg' 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 ドキュメント', - link: 'https://v4.vitejs.dev', + link: 'https://v4.vite.dev', }, { text: 'Vite 3 ドキュメント', - link: 'https://v3.vitejs.dev', + link: 'https://v3.vite.dev', }, { text: 'Vite 2 ドキュメント', - link: 'https://v2.vitejs.dev', + link: 'https://v2.vite.dev', }, ] @@ -58,7 +58,7 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => { return [ { text: 'Vite 5 ドキュメント(リリース)', - link: 'https://vitejs.dev', + link: 'https://vite.dev', }, ...oldVersions, ] @@ -124,12 +124,12 @@ export default defineConfig({ locales: { root: { label: '日本語' }, - en: { label: 'English', link: 'https://vitejs.dev' }, - zh: { label: '简体中文', link: 'https://cn.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' }, + en: { label: 'English', link: 'https://vite.dev' }, + zh: { label: '简体中文', link: 'https://cn.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' }, ], @@ -195,7 +195,7 @@ export default defineConfig({ }, { text: 'Discord Chat', - link: 'https://chat.vitejs.dev', + link: 'https://chat.vite.dev', }, { text: 'Awesome Vite', diff --git a/README.md b/README.md index e597311e..621f849f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Vite Docs JA -[Vite ドキュメント](https://vitejs.dev)の日本語翻訳リポジトリーです。現状、本リポジトリーは翻訳作業用のものとして一時的に用意されています。将来的に、本リポジトリーは別場所に移動される可能性があります。 +[Vite ドキュメント](https://vite.dev)の日本語翻訳リポジトリーです。現状、本リポジトリーは翻訳作業用のものとして一時的に用意されています。将来的に、本リポジトリーは別場所に移動される可能性があります。 ## 貢献ガイド [Vite 日本語翻訳ガイド](https://github.com/vitejs/docs-ja/blob/main/CONTRIBUTING.md) を一読お願いします! diff --git a/blog/announcing-vite2.md b/blog/announcing-vite2.md index 11cd6d52..e966c791 100644 --- a/blog/announcing-vite2.md +++ b/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/blog/announcing-vite3.md b/blog/announcing-vite3.md index d8d08da5..822110fc 100644 --- a/blog/announcing-vite3.md +++ b/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/blog/announcing-vite4-3.md b/blog/announcing-vite4-3.md index 534a2fdc..b725308b 100644 --- a/blog/announcing-vite4-3.md +++ b/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/blog/announcing-vite4.md b/blog/announcing-vite4.md index 587d4397..f17bca9c 100644 --- a/blog/announcing-vite4.md +++ b/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/blog/announcing-vite5-1.md b/blog/announcing-vite5-1.md index bc9286bb..bbb24a8e 100644 --- a/blog/announcing-vite5-1.md +++ b/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/blog/announcing-vite5.md b/blog/announcing-vite5.md index dd4c1d46..06346382 100644 --- a/blog/announcing-vite5.md +++ b/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/config/server-options.md b/config/server-options.md index 39d0c76a..ed92dd14 100644 --- a/config/server-options.md +++ b/config/server-options.md @@ -166,7 +166,7 @@ HMR 接続の無効化または設定(HMR WebSocket が http サーバーと デフォルトの設定では、Vite の前のリバースプロキシが WebSocket のプロキシに対応していることが期待されています。Vite の HMR クライアントが WebSocket の接続に失敗した場合、クライアントはリバースプロキシを迂回して直接 Vite の HMR サーバーに接続するようにフォールバックします: ``` -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. ``` フォールバックが発生した際のブラウザーに表示されるエラーは無視できます。直接リバースプロキシを迂回してエラーを回避するには、次のいずれかを行えます: diff --git a/guide/api-plugin.md b/guide/api-plugin.md index 33769bd0..a40bde13 100644 --- a/guide/api-plugin.md +++ b/guide/api-plugin.md @@ -6,9 +6,9 @@ Vite プラグインは、Rollup の優れた設計のプラグインインタ ## プラグインの作成 -Vite は、確立されたパターンをすぐに提供できるように努めているため、新しいプラグインを作成する前に、[機能ガイド](https://vitejs.dev/guide/features)をチェックして、ニーズが満たされているかどうかを確認してください。また、[互換性のある Rollup プラグイン](https://github.com/rollup/awesome)と [Vite 固有のプラグイン](https://github.com/vitejs/awesome-vite#plugins)の両方の形式で、利用可能なコミュニティープラグインを確認してください。 +Vite は、確立されたパターンをすぐに提供できるように努めているため、新しいプラグインを作成する前に、[機能ガイド](https://vite.dev/guide/features)をチェックして、ニーズが満たされているかどうかを確認してください。また、[互換性のある Rollup プラグイン](https://github.com/rollup/awesome)と [Vite 固有のプラグイン](https://github.com/vitejs/awesome-vite#plugins)の両方の形式で、利用可能なコミュニティープラグインを確認してください。 -プラグインを作成する際には、`vite.config.js` にインラインで記述できます。そのために新しいパッケージを作成する必要はありません。あるプラグインが自分のプロジェクトで役に立ったことがわかったら、[エコシステムにいる](https://chat.vitejs.dev)他の人を助けるために共有することを検討してください。 +プラグインを作成する際には、`vite.config.js` にインラインで記述できます。そのために新しいパッケージを作成する必要はありません。あるプラグインが自分のプロジェクトで役に立ったことがわかったら、[エコシステムにいる](https://chat.vite.dev)他の人を助けるために共有することを検討してください。 ::: tip プラグインを学んだり、デバッグしたり、作成したりする際には、 [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect) をプロジェクトに含めることをお勧めします。これにより、Vite プラグインの中間状態を検査できます。インストール後、`localhost:5173/__inspect/` にアクセスして、プロジェクトのモジュールや変換スタックを検査できます。インストール方法については、[vite-plugin-inspect のドキュメント](https://github.com/antfu/vite-plugin-inspect)をご覧ください。 diff --git a/guide/comparisons.md b/guide/comparisons.md index 9eccae95..7f8d7dcf 100644 --- a/guide/comparisons.md +++ b/guide/comparisons.md @@ -18,4 +18,4 @@ WMR はもうメンテナンスされていません。Preact チームは現在 [Snowpack](https://www.snowpack.dev/) も no-bundle ネイティブな ESM の開発サーバーで、Vite と非常に近い目的を持っています。このプロジェクトは今ではメンテナンスされていません。現在、Snowpack チームは Vite を利用した静的サイトビルダーである [Astro](https://astro.build/) の開発に取り組んでいます。Astro チームは現在、エコシステムでの活発なプレイヤーであり、Vite の改良に貢献しています。 -実装の詳細が異なる点を除き、2 つのプロジェクトは伝統的なツールより技術的に優れている点で非常に多くの共通点があります。Vite の依存関係の事前ビルドの機能は、Snowpack v1(現在の[`esinstall`](https://github.com/snowpackjs/snowpack/tree/main/esinstall))にも影響を受けています。2 つのプロジェクト間の大きな違いは、[v2の比較ガイド](https://v2.vitejs.dev/guide/comparisons) に列挙されています。 +実装の詳細が異なる点を除き、2 つのプロジェクトは伝統的なツールより技術的に優れている点で非常に多くの共通点があります。Vite の依存関係の事前ビルドの機能は、Snowpack v1(現在の[`esinstall`](https://github.com/snowpackjs/snowpack/tree/main/esinstall))にも影響を受けています。2 つのプロジェクト間の大きな違いは、[v2の比較ガイド](https://v2.vite.dev/guide/comparisons) に列挙されています。 diff --git a/guide/features.md b/guide/features.md index bd39277c..e9766031 100644 --- a/guide/features.md +++ b/guide/features.md @@ -499,7 +499,7 @@ const modules = { #### カスタムクエリー -また、`query` オプションを使用すると、クエリーをインポートに指定することもできます。たとえば、アセットを[文字列として](https://vitejs.dev/guide/assets.html#importing-asset-as-string)または [url として](https://vitejs.dev/guide/assets.html#importing-asset-as-url)インポートするには、次のように書きます: +また、`query` オプションを使用すると、クエリーをインポートに指定することもできます。たとえば、アセットを[文字列として](https://vite.dev/guide/assets.html#importing-asset-as-string)または [url として](https://vite.dev/guide/assets.html#importing-asset-as-url)インポートするには、次のように書きます: ```ts twoslash import 'vite/client' diff --git a/guide/index.md b/guide/index.md index 485bba2f..6d6ce937 100644 --- a/guide/index.md +++ b/guide/index.md @@ -217,4 +217,4 @@ pnpm link --global # このステップでは好きなパッケージマネー ## コミュニティー -質問がある場合やサポートが必要な場合は、[Discord](https://chat.vitejs.dev) や [GitHub Discussions](https://github.com/vitejs/vite/discussions) でコミュニティーに連絡してください。 +質問がある場合やサポートが必要な場合は、[Discord](https://chat.vite.dev) や [GitHub Discussions](https://github.com/vitejs/vite/discussions) でコミュニティーに連絡してください。 diff --git a/guide/migration.md b/guide/migration.md index 714dda71..800b81ae 100644 --- a/guide/migration.md +++ b/guide/migration.md @@ -175,7 +175,7 @@ Vite 5 では、esbuild 0.19 を使用し、esbuild 0.18 の互換性レイヤ ### `--https` フラグおよび `https: true` の削除 -`--https` フラグは、内部で `server.https: true` および `preview.https: true` を設定します。この設定は、[Vite 3 で削除された自動的な https 証明書生成機能](https://v3.vitejs.dev/guide/migration.html#automatic-https-certificate-generation)と一緒に使用されることを意図していました。したがって、この設定は証明書のない Vite の HTTPS サーバーを開始するため、もはや有用ではありません。 +`--https` フラグは、内部で `server.https: true` および `preview.https: true` を設定します。この設定は、[Vite 3 で削除された自動的な https 証明書生成機能](https://v3.vite.dev/guide/migration.html#automatic-https-certificate-generation)と一緒に使用されることを意図していました。したがって、この設定は証明書のない Vite の HTTPS サーバーを開始するため、もはや有用ではありません。 [`@vitejs/plugin-basic-ssl`](https://github.com/vitejs/vite-plugin-basic-ssl) または [`vite-plugin-mkcert`](https://github.com/liuweiGL/vite-plugin-mkcert) を使用している場合、これらはすでに `https` 設定を内部で行っているため、設定から `--https`、`server.https: true`、および `preview.https: true` を削除できます。 @@ -243,4 +243,4 @@ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8')) ## v3 からの移行 -Vite v4 ドキュメントの [Migration from v3 Guide](https://v4.vitejs.dev/guide/migration.html) をまず確認し、アプリを Vite v4 に移植するために必要な変更を調べてから、このページの変更点を進めてください。 +Vite v4 ドキュメントの [Migration from v3 Guide](https://v4.vite.dev/guide/migration.html) をまず確認し、アプリを Vite v4 に移植するために必要な変更を調べてから、このページの変更点を進めてください。 diff --git a/guide/performance.md b/guide/performance.md index 19cf6650..5c6766ba 100644 --- a/guide/performance.md +++ b/guide/performance.md @@ -29,7 +29,7 @@ Vite の内部および公式プラグインは、幅広いエコシステムと `vite --debug plugin-transform` または [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect) を使用してファイルの変換にかかる時間を調査できます。非同期操作はタイミングが不正確になる傾向があるため、これらの数字はおおよその推定値として扱うべきですが、よりコストのかかる操作を明らかにするのには十分です。 ::: tip プロファイリング -`vite --profile` を実行してサイトにアクセスし、ターミナルで `p + enter` を押して `.cpuprofile` を記録できます。[speedscope](https://www.speedscope.app) のようなツールを使用してプロファイルを検査し、ボトルネックを特定できます。また、[プロファイルを共有](https://chat.vitejs.dev) して Vite チームがパフォーマンスの問題を特定するのに役立てることもできます。 +`vite --profile` を実行してサイトにアクセスし、ターミナルで `p + enter` を押して `.cpuprofile` を記録できます。[speedscope](https://www.speedscope.app) のようなツールを使用してプロファイルを検査し、ボトルネックを特定できます。また、[プロファイルを共有](https://chat.vite.dev) して Vite チームがパフォーマンスの問題を特定するのに役立てることもできます。 ::: ## 解決操作の削減 diff --git a/guide/philosophy.md b/guide/philosophy.md index 851baa8a..c4d933b2 100644 --- a/guide/philosophy.md +++ b/guide/philosophy.md @@ -24,4 +24,4 @@ Vite はユーザーが直接使用することもできますが、フレーム ## アクティブなエコシステム -Vite の進化は、フレームワークやプラグインのメンテナ、ユーザー、そして Vite チームの協力によって成り立っています。プロジェクトが Vite を採用したら、Vite のコア開発に積極的に参加することを推奨しています。[vite-ecosystem-ci](https://github.com/vitejs/vite-ecosystem-ci) のようなツールに助けられながら、各リリースでのリグレッションを最小化するために、エコシステムの主要なプロジェクトと密接に協力しています。このツールにより、選択した PR に対して Vite を使用して主要プロジェクトの CI を実行することができ、エコシステムがリリースに対してどのように反応するかを明確に把握することができます。私たちは、ユーザーに影響を与える前にリグレッションを修正し、プロジェクトがリリースされたらすぐに次のバージョンにアップデートできるように努めています。もしあなたが Vite で仕事をしているのであれば、ぜひ [Vite の Discord](https://chat.vitejs.dev) に参加して、プロジェクトにも参加してください。 +Vite の進化は、フレームワークやプラグインのメンテナ、ユーザー、そして Vite チームの協力によって成り立っています。プロジェクトが Vite を採用したら、Vite のコア開発に積極的に参加することを推奨しています。[vite-ecosystem-ci](https://github.com/vitejs/vite-ecosystem-ci) のようなツールに助けられながら、各リリースでのリグレッションを最小化するために、エコシステムの主要なプロジェクトと密接に協力しています。このツールにより、選択した PR に対して Vite を使用して主要プロジェクトの CI を実行することができ、エコシステムがリリースに対してどのように反応するかを明確に把握することができます。私たちは、ユーザーに影響を与える前にリグレッションを修正し、プロジェクトがリリースされたらすぐに次のバージョンにアップデートできるように努めています。もしあなたが Vite で仕事をしているのであれば、ぜひ [Vite の Discord](https://chat.vite.dev) に参加して、プロジェクトにも参加してください。 diff --git a/guide/troubleshooting.md b/guide/troubleshooting.md index 8944ed22..6bab5b2d 100644 --- a/guide/troubleshooting.md +++ b/guide/troubleshooting.md @@ -2,7 +2,7 @@ さらなる情報は[Rollup のトラブルシューティングガイド](https://rollupjs.org/troubleshooting/)もご覧ください。 -こちらに提案されているもので動作しなかった場合、[GitHub Discussions](https://github.com/vitejs/vite/discussions) や [Vite Land Discord](https://chat.vitejs.dev) の `#help` チャンネルで質問してみてください。 +こちらに提案されているもので動作しなかった場合、[GitHub Discussions](https://github.com/vitejs/vite/discussions) や [Vite Land Discord](https://chat.vite.dev) の `#help` チャンネルで質問してみてください。 ## CJS @@ -123,7 +123,7 @@ security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain- サーバー / WebSocket サーバーが大きな HTTP ヘッダーを受信した場合、リクエストが破棄され次のような警告が表示されます。 -> 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. これは [CVE-2018-12121](https://www.cve.org/CVERecord?id=CVE-2018-12121) を軽減するため Node.js がリクエストヘッダーサイズを制限しているためです。