From 1cc2e2d2d5db55fd54f4e0cc8f3dbc1176706ea6 Mon Sep 17 00:00:00 2001 From: patak Date: Thu, 12 May 2022 16:47:04 +0200 Subject: [PATCH] feat!: vite dev default port is now 5173 (#8148) --- docs/config/index.md | 4 ++-- docs/guide/api-plugin.md | 2 +- docs/guide/backend-integration.md | 6 +++--- docs/guide/ssr.md | 2 +- packages/vite/src/node/server/index.ts | 2 +- packages/vite/src/node/server/middlewares/indexHtml.ts | 6 +++--- playground/cli-module/__tests__/serve.ts | 2 +- playground/cli/__tests__/serve.ts | 4 ++-- playground/json/server.js | 4 ++-- playground/optimize-missing-deps/server.js | 4 ++-- playground/ssr-deps/server.js | 4 ++-- playground/ssr-html/server.js | 4 ++-- playground/ssr-pug/server.js | 4 ++-- playground/ssr-react/server.js | 4 ++-- playground/ssr-vue/server.js | 4 ++-- playground/ssr-webworker/worker.js | 4 ++-- 16 files changed, 30 insertions(+), 30 deletions(-) diff --git a/docs/config/index.md b/docs/config/index.md index 212e0439d..1c61f2bef 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -477,7 +477,7 @@ export default defineConfig(({ command, mode }) => { ### server.port - **Type:** `number` -- **Default:** `3000` +- **Default:** `5173` Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. @@ -551,7 +551,7 @@ export default defineConfig(({ command, mode }) => { }, // Proxying websockets or socket.io '/socket.io': { - target: 'ws://localhost:3000', + target: 'ws://localhost:5173', ws: true } } diff --git a/docs/guide/api-plugin.md b/docs/guide/api-plugin.md index 76b9984a0..735a30d32 100644 --- a/docs/guide/api-plugin.md +++ b/docs/guide/api-plugin.md @@ -11,7 +11,7 @@ Vite strives to offer established patterns out of the box, so before creating a 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). ::: 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:3000/__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). +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). ![vite-plugin-inspect](/images/vite-plugin-inspect.png) ::: diff --git a/docs/guide/backend-integration.md b/docs/guide/backend-integration.md index 17387bb78..06f2941c1 100644 --- a/docs/guide/backend-integration.md +++ b/docs/guide/backend-integration.md @@ -29,11 +29,11 @@ If you need a custom integration, you can follow the steps in this guide to conf import 'vite/modulepreload-polyfill' ``` -2. For development, inject the following in your server's HTML template (substitute `http://localhost:3000` with the local URL Vite is running at): +2. For development, inject the following in your server's HTML template (substitute `http://localhost:5173` with the local URL Vite is running at): ```html - + ``` In order to properly serve assets, you have two options: @@ -47,7 +47,7 @@ If you need a custom integration, you can follow the steps in this guide to conf ```html