From bb2cbce354f5581cb4613e6ba019760a1203264e Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Wed, 23 Nov 2022 09:33:17 -0500 Subject: [PATCH] fix(bundling): run dev-server in development mode and hmr on by default --- docs/generated/packages/vite.json | 12 ++++++++---- packages/vite/src/executors/build/schema.json | 4 +++- packages/vite/src/executors/dev-server/schema.json | 8 +++++--- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/generated/packages/vite.json b/docs/generated/packages/vite.json index 566e0f84871a6..a56274c7d6474 100644 --- a/docs/generated/packages/vite.json +++ b/docs/generated/packages/vite.json @@ -125,8 +125,8 @@ }, "hmr": { "description": "Enable hot module replacement. For more options, use the 'hmr' option in the Vite configuration file.", - "default": false, - "type": "boolean" + "type": "boolean", + "default": true }, "open": { "description": "Automatically open the app in the browser on server start. When the value is a string, it will be used as the URL's pathname.", @@ -144,7 +144,9 @@ }, "mode": { "type": "string", - "description": "Specifying this in config will override the default mode for both serve and build." + "description": "Mode to run the server in.", + "enum": ["production", "development"], + "default": "development" }, "clearScreen": { "description": "Set to false to prevent Vite from clearing the terminal screen when logging certain messages.", @@ -280,7 +282,9 @@ }, "mode": { "type": "string", - "description": "Specifying this in config will override the default mode for both serve and build." + "description": "Mode to run the build in.", + "enum": ["production", "development"], + "default": "production" } }, "definitions": { diff --git a/packages/vite/src/executors/build/schema.json b/packages/vite/src/executors/build/schema.json index 01f059ae998a9..e788006f18989 100644 --- a/packages/vite/src/executors/build/schema.json +++ b/packages/vite/src/executors/build/schema.json @@ -121,7 +121,9 @@ }, "mode": { "type": "string", - "description": "Specifying this in config will override the default mode for both serve and build." + "description": "Mode to run the build in.", + "enum": ["production", "development"], + "default": "production" } }, "definitions": { diff --git a/packages/vite/src/executors/dev-server/schema.json b/packages/vite/src/executors/dev-server/schema.json index 45d24bff27d09..08b793904553b 100644 --- a/packages/vite/src/executors/dev-server/schema.json +++ b/packages/vite/src/executors/dev-server/schema.json @@ -49,8 +49,8 @@ }, "hmr": { "description": "Enable hot module replacement. For more options, use the 'hmr' option in the Vite configuration file.", - "default": false, - "type": "boolean" + "type": "boolean", + "default": true }, "open": { "description": "Automatically open the app in the browser on server start. When the value is a string, it will be used as the URL's pathname.", @@ -75,7 +75,9 @@ }, "mode": { "type": "string", - "description": "Specifying this in config will override the default mode for both serve and build." + "description": "Mode to run the server in.", + "enum": ["production", "development"], + "default": "development" }, "clearScreen": { "description": "Set to false to prevent Vite from clearing the terminal screen when logging certain messages.",