From cc639657cc886a15b6fe06874e8f8ca8a6df1d6d Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Sun, 5 Nov 2023 17:46:33 +0800 Subject: [PATCH 1/4] docs(migration): tweak wordings (#14876) --- guide/migration.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/guide/migration.md b/guide/migration.md index ca121e10..e17b5458 100644 --- a/guide/migration.md +++ b/guide/migration.md @@ -120,7 +120,7 @@ In Vite 4, the dev and preview servers serve HTML based on its directory structu | Request | Before (dev) | Before (preview) | After (dev & preview) | | ----------------- | ---------------------------- | ----------------- | ---------------------------- | | `/dir/index.html` | `/dir/index.html` | `/dir/index.html` | `/dir/index.html` | -| `/dir` | `/index.html` (SPA fallback) | `/dir/index.html` | `/dir.html` (SPA fallback) | +| `/dir` | `/index.html` (SPA fallback) | `/dir/index.html` | `/index.html` (SPA fallback) | | `/dir/` | `/dir/index.html` | `/dir/index.html` | `/dir/index.html` | | `/file.html` | `/file.html` | `/file.html` | `/file.html` | | `/file` | `/index.html` (SPA fallback) | `/file.html` | `/file.html` | @@ -128,7 +128,9 @@ In Vite 4, the dev and preview servers serve HTML based on its directory structu ### Manifest files are now generated in `.vite` directory by default -In Vite 4, the manifest files ([`build.manifest`](/config/build-options.md#build-manifest), [`build.ssrManifest`](/config/build-options.md#build-ssrmanifest)) was generated in the root of [`build.outDir`](/config/build-options.md#build-outdir) by default. From Vite 5, those will be generated in the `.vite` directory in the `build.outDir` by default. +In Vite 4, the manifest files ([`build.manifest`](/config/build-options.md#build-manifest) and [`build.ssrManifest`](/config/build-options.md#build-ssrmanifest)) were generated in the root of [`build.outDir`](/config/build-options.md#build-outdir) by default. + +From Vite 5, they will be generated in the `.vite` directory in the `build.outDir` by default. This change helps deconflict public files with the same manifest file names when they are copied to the `build.outDir`. ### CLI shortcuts require an additional `Enter` press @@ -163,8 +165,9 @@ Vite 5 uses esbuild 0.19 and removes the compatibility layer for esbuild 0.18, w ### Remove `--https` flag and `https: true` -`--https` flag sets `https: true`. This config was meant to be used together with the automatic https certification generation feature which [was dropped in Vite 3](https://v3.vitejs.dev/guide/migration.html#automatic-https-certificate-generation). This config no longer makes sense as it will make Vite start a HTTPS server without a certificate. -Both [`@vitejs/plugin-basic-ssl`](https://github.com/vitejs/vite-plugin-basic-ssl) and [`vite-plugin-mkcert`](https://github.com/liuweiGL/vite-plugin-mkcert) sets `https` setting regardless of the `https` value, so you can just remove `--https` and `https: true`. +The `--https` flag sets `server.https: true` and `preview.https: true` internally. This config was meant to be used together with the automatic https certification generation feature which [was dropped in Vite 3](https://v3.vitejs.dev/guide/migration.html#automatic-https-certificate-generation). Hence, this config is no longer useful as it will start a Vite HTTPS server without a certificate. + +If you use [`@vitejs/plugin-basic-ssl`](https://github.com/vitejs/vite-plugin-basic-ssl) or [`vite-plugin-mkcert`](https://github.com/liuweiGL/vite-plugin-mkcert), they will already set the `https` config internally, so you can remove `--https`, `server.https: true`, and `preview.https: true` in your setup. ### Remove `resolvePackageEntry` and `resolvePackageData` APIs From 4370c655f08228e395fa1ffe5194d497ed5711be Mon Sep 17 00:00:00 2001 From: Maciek Palmowski Date: Mon, 6 Nov 2023 10:05:39 +0100 Subject: [PATCH 2/4] docs: add Kinsta deployment guide (#14755) --- guide/static-deploy.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guide/static-deploy.md b/guide/static-deploy.md index bb2f6cfd..c439d8ee 100644 --- a/guide/static-deploy.md +++ b/guide/static-deploy.md @@ -341,3 +341,7 @@ Deploy your static site using [Flightcontrol](https://www.flightcontrol.dev/?ref ## AWS Amplify Hosting Deploy your static site using [AWS Amplify Hosting](https://aws.amazon.com/amplify/hosting/), by following these [instructions](https://docs.amplify.aws/guides/hosting/vite/q/platform/js/) + +## Kinsta Static Site Hosting + +You can deploy your Vite app as a Static Site on [Kinsta](https://kinsta.com/static-site-hosting/) by following these [instructions](https://kinsta.com/docs/react-vite-example/). From 2da060f4d1db39342054e71f2a924a11d0328846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Tue, 7 Nov 2023 01:39:17 +0900 Subject: [PATCH 3/4] docs: add #14834 to migration guide (#14889) --- guide/migration.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guide/migration.md b/guide/migration.md index e17b5458..a6f70870 100644 --- a/guide/migration.md +++ b/guide/migration.md @@ -207,6 +207,8 @@ There are some changes which only affect plugin/tool creators. - The `configurePreviewServer` hook now accepts the `PreviewServer` type instead of `PreviewServerForHook` type. - [[#14818] refactor(preview)!: use base middleware](https://github.com/vitejs/vite/pull/14818) - Middlewares added from the returned function in `configurePreviewServer` now does not have access to the `base` when comparing the `req.url` value. This aligns the behaviour with the dev server. You can check the `base` from the `configResolved` hook if needed. +- [[#14834] fix(types)!: expose httpServer with Http2SecureServer union](https://github.com/vitejs/vite/pull/14834) + - `http.Server | http2.Http2SecureServer` is now used instead of `http.Server` where appropriate. Also there are other breaking changes which only affect few users. From 51753d7e958b31dbc48998ff3a0113116eb96ec8 Mon Sep 17 00:00:00 2001 From: waynzh Date: Tue, 7 Nov 2023 10:14:36 +0800 Subject: [PATCH 4/4] docs(cn): resolve conflicts --- guide/migration.md | 17 ++++------------- guide/static-deploy.md | 8 ++------ 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/guide/migration.md b/guide/migration.md index b1dd4e93..bc362c04 100644 --- a/guide/migration.md +++ b/guide/migration.md @@ -128,13 +128,9 @@ const foo = _foo.default ### Manifest 文件现在默认生成到 `.vite` 目录中 {#manifest-files-are-now-generated-in-vite-directory-by-default} -<<<<<<< HEAD -在 Vite 4 中,manifest 文件([`build.manifest`](/config/build-options.md#build-manifest),[`build.ssrManifest`](/config/build-options.md#build-ssrmanifest))默认会生成在 [`build.outDir`](/config/build-options.md#build-outdir) 的根目录中。从 Vite 5 开始,这些文件将默认生成在 `build.outDir` 中的 `.vite` 目录中。 -======= -In Vite 4, the manifest files ([`build.manifest`](/config/build-options.md#build-manifest) and [`build.ssrManifest`](/config/build-options.md#build-ssrmanifest)) were generated in the root of [`build.outDir`](/config/build-options.md#build-outdir) by default. +在 Vite 4 中,manifest 文件([`build.manifest`](/config/build-options.md#build-manifest),[`build.ssrManifest`](/config/build-options.md#build-ssrmanifest))默认会生成在 [`build.outDir`](/config/build-options.md#build-outdir) 的根目录中。 -From Vite 5, they will be generated in the `.vite` directory in the `build.outDir` by default. This change helps deconflict public files with the same manifest file names when they are copied to the `build.outDir`. ->>>>>>> 2da060f4d1db39342054e71f2a924a11d0328846 +从 Vite 5 开始,这些文件将默认生成在 `build.outDir` 中的 `.vite` 目录中。这个改变有助于解决当公共文件被复制到 `build.outDir` 时,具有相同 manifest 文件名时的冲突。 ### CLI 快捷功能键需要一个额外的 `Enter` 按键 {#cli-shortcuts-require-an-additional-enter-press} @@ -169,14 +165,9 @@ Vite 5 使用 esbuild 0.19 并移除了 esbuild 0.18 的兼容层,这改变了 ### 移除 `--https` 标志和 `https: true` {#remove-https-flag-and-https-true} -<<<<<<< HEAD -`--https` 标志设置 `https: true`。这个配置本来是要与自动 https 证书生成特性一起使用的,但这个特性在 [Vite 3 中被移除](https://v3.vitejs.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` 值是什么,所以你可以直接移除 `--https` 和 `https: true`。 -======= -The `--https` flag sets `server.https: true` and `preview.https: true` internally. This config was meant to be used together with the automatic https certification generation feature which [was dropped in Vite 3](https://v3.vitejs.dev/guide/migration.html#automatic-https-certificate-generation). Hence, this config is no longer useful as it will start a Vite HTTPS server without a certificate. +`--https` 标志会在内部设置 `server.https: true` 和 `preview.https: true`。这个配置本来是为了与自动 https 证书生成功能一起使用的,但是这个功能在[Vite 3 中被移除](https://v3.vitejs.dev/guide/migration.html#automatic-https-certificate-generation)。因此,这个配置已经不再有用,因为它会启动一个没有证书的 Vite HTTPS 服务器。 -If you use [`@vitejs/plugin-basic-ssl`](https://github.com/vitejs/vite-plugin-basic-ssl) or [`vite-plugin-mkcert`](https://github.com/liuweiGL/vite-plugin-mkcert), they will already set the `https` config internally, so you can remove `--https`, `server.https: true`, and `preview.https: true` in your setup. ->>>>>>> 2da060f4d1db39342054e71f2a924a11d0328846 +如果你使用 [`@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`。 ### 移除 `resolvePackageEntry` 和 `resolvePackageData` API {#remove-resolvepackageentry-and-resolvepackagedata-apis} diff --git a/guide/static-deploy.md b/guide/static-deploy.md index 979f2a5c..a22a1f16 100644 --- a/guide/static-deploy.md +++ b/guide/static-deploy.md @@ -340,12 +340,8 @@ $ npx wrangler pages deploy dist ## AWS Amplify 部署 {#aws-amplify-hoisting} -<<<<<<< HEAD 使用 [AWS Amplify 部署](https://aws.amazon.com/amplify/hosting/) 部署静态站点,可以按照 [说明](https://docs.amplify.aws/guides/hosting/vite/q/platform/js/) 进行操作。 -======= -Deploy your static site using [AWS Amplify Hosting](https://aws.amazon.com/amplify/hosting/), by following these [instructions](https://docs.amplify.aws/guides/hosting/vite/q/platform/js/) -## Kinsta Static Site Hosting +## Kinsta 静态站点托管 {#kinsta-static-site-hosting} -You can deploy your Vite app as a Static Site on [Kinsta](https://kinsta.com/static-site-hosting/) by following these [instructions](https://kinsta.com/docs/react-vite-example/). ->>>>>>> 2da060f4d1db39342054e71f2a924a11d0328846 +你可以按照这些 [说明](https://kinsta.com/docs/react-vite-example/) 在 [Kinsta](https://kinsta.com/static-site-hosting/) 上部署你的 Vite 应用作为一个静态站点。