From ca4b5cf8fe64fc5371784885d4febd2b0801a737 Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Mon, 19 Sep 2022 11:48:24 +0100 Subject: [PATCH 1/4] docs(configuration): move `name` option to correct place The `name` option was listed under the `output` object which is incorrect. Move it to top-level configuration object. --- src/content/configuration/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/configuration/index.mdx b/src/content/configuration/index.mdx index da67f77e5dc6..cde69585ab23 100644 --- a/src/content/configuration/index.mdx +++ b/src/content/configuration/index.mdx @@ -18,6 +18,7 @@ contributors: - bigdawggi - anshumanv - textbook + - coly010 --- Out of the box, webpack won't require you to use a configuration file. However, it will assume the entry point of your project is `src/index.js` and will output the result in `dist/main.js` minified and optimized for production. @@ -64,6 +65,7 @@ module.exports = { mode: "development", // enabled useful tools for development mode: "none", // no defaults + name: "my-config", // name of the configuration, shown in output // Chosen mode tells webpack to use its built-in optimizations accordingly. @@ -178,8 +180,6 @@ module.exports = { }, uniqueName: "my-application", // (defaults to package.json "name") // unique name for this build to avoid conflicts with other builds in the same HTML - name: "my-config", - // name of the configuration, shown in output /* Advanced output configuration (click to show) */ From 9e17addc4a026f02982e69d1dc8671ead6a0314b Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Mon, 19 Sep 2022 11:57:05 +0100 Subject: [PATCH 2/4] docs(configuration): place `name` option at the top of config object --- src/content/configuration/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/configuration/index.mdx b/src/content/configuration/index.mdx index cde69585ab23..5346cbbcfd7d 100644 --- a/src/content/configuration/index.mdx +++ b/src/content/configuration/index.mdx @@ -57,6 +57,7 @@ W> Notice that many array configurations allow to reference the default value vi const path = require('path'); module.exports = { + name: "my-config", // name of the configuration, shown in output mode: "production", // "production" | "development" | "none" @@ -65,7 +66,6 @@ module.exports = { mode: "development", // enabled useful tools for development mode: "none", // no defaults - name: "my-config", // name of the configuration, shown in output // Chosen mode tells webpack to use its built-in optimizations accordingly. From 2b492d24c183686c7566a1a0b88d8f61d2e7b8d4 Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Mon, 19 Sep 2022 12:15:54 +0100 Subject: [PATCH 3/4] docs(configuration): fix spacing --- src/content/configuration/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/configuration/index.mdx b/src/content/configuration/index.mdx index 5346cbbcfd7d..6aa0d6440623 100644 --- a/src/content/configuration/index.mdx +++ b/src/content/configuration/index.mdx @@ -57,7 +57,7 @@ W> Notice that many array configurations allow to reference the default value vi const path = require('path'); module.exports = { - name: "my-config", // name of the configuration, shown in output + name: "my-config", // name of the configuration, shown in output mode: "production", // "production" | "development" | "none" From 9342364b3a3eff7ff74b508341be1894bd8c4d5b Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Mon, 19 Sep 2022 14:41:20 +0100 Subject: [PATCH 4/4] docs(configuration): fix whitespace Co-authored-by: Sam Chen --- src/content/configuration/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/configuration/index.mdx b/src/content/configuration/index.mdx index 6aa0d6440623..5660d2b46ff4 100644 --- a/src/content/configuration/index.mdx +++ b/src/content/configuration/index.mdx @@ -57,7 +57,7 @@ W> Notice that many array configurations allow to reference the default value vi const path = require('path'); module.exports = { - name: "my-config", // name of the configuration, shown in output + name: "my-config", // name of the configuration, shown in output mode: "production", // "production" | "development" | "none"