From 2a7ccb6743eff2933616c52b9256f95cd450aade Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Wed, 23 Nov 2022 10:02:28 -0500 Subject: [PATCH] fix(bundling): run dev-server in development mode and hmr on by default (#13352) --- 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 19c9c784fe205..5d9932dd39798 100644 --- a/docs/generated/packages/vite.json +++ b/docs/generated/packages/vite.json @@ -167,8 +167,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.", @@ -186,7 +186,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.", @@ -322,7 +324,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.",