@@ -72,8 +72,6 @@ exports[`create-webpack-app cli should configure WDS as opted 2`] = `
7272import path from "node:path";
7373import { fileURLToPath } from "node:url";
7474
75-
76-
7775const __filename = fileURLToPath(import.meta.url);
7876const __dirname = path.dirname(__filename);
7977const isProduction = process.env.NODE_ENV === "production";
@@ -109,8 +107,6 @@ const config = {
109107export default () => {
110108 if (isProduction) {
111109 config.mode = "production";
112-
113-
114110 } else {
115111 config.mode = "development";
116112 }
@@ -144,7 +140,6 @@ exports[`create-webpack-app cli should configure html-webpack-plugin as opted 2`
144140
145141import path from "node:path";
146142import { fileURLToPath } from "node:url";
147-
148143import HtmlWebpackPlugin from "html-webpack-plugin";
149144
150145const __filename = fileURLToPath(import.meta.url);
@@ -187,8 +182,6 @@ const config = {
187182export default () => {
188183 if (isProduction) {
189184 config.mode = "production";
190-
191-
192185 } else {
193186 config.mode = "development";
194187 }
@@ -223,7 +216,6 @@ exports[`create-webpack-app cli should configure workbox-webpack-plugin as opted
223216
224217import path from "node:path";
225218import { fileURLToPath } from "node:url";
226-
227219import HtmlWebpackPlugin from "html-webpack-plugin";
228220import WorkboxWebpackPlugin from "workbox-webpack-plugin";
229221
@@ -267,7 +259,6 @@ const config = {
267259export default () => {
268260 if (isProduction) {
269261 config.mode = "production";
270-
271262 config.plugins!.push(new WorkboxWebpackPlugin.GenerateSW());
272263 } else {
273264 config.mode = "development";
@@ -304,8 +295,6 @@ exports[`create-webpack-app cli should generate ES6 project correctly 2`] = `
304295import path from "node:path";
305296import { fileURLToPath } from "node:url";
306297
307-
308-
309298const __filename = fileURLToPath(import.meta.url);
310299const __dirname = path.dirname(__filename);
311300const isProduction = process.env.NODE_ENV === "production";
@@ -342,8 +331,6 @@ const config = {
342331export default () => {
343332 if (isProduction) {
344333 config.mode = "production";
345-
346-
347334 } else {
348335 config.mode = "development";
349336 }
@@ -380,7 +367,6 @@ exports[`create-webpack-app cli should generate default project when nothing is
380367
381368import path from "node:path";
382369import { fileURLToPath } from "node:url";
383-
384370import HtmlWebpackPlugin from "html-webpack-plugin";
385371import WorkboxWebpackPlugin from "workbox-webpack-plugin";
386372
@@ -427,7 +413,6 @@ const config = {
427413export default () => {
428414 if (isProduction) {
429415 config.mode = "production";
430-
431416 config.plugins!.push(new WorkboxWebpackPlugin.GenerateSW());
432417 } else {
433418 config.mode = "development";
@@ -465,7 +450,6 @@ exports[`create-webpack-app cli should generate default project when nothing is
465450
466451import path from "node:path";
467452import { fileURLToPath } from "node:url";
468-
469453import HtmlWebpackPlugin from "html-webpack-plugin";
470454import WorkboxWebpackPlugin from "workbox-webpack-plugin";
471455
@@ -512,7 +496,6 @@ const config = {
512496export default () => {
513497 if (isProduction) {
514498 config.mode = "production";
515-
516499 config.plugins!.push(new WorkboxWebpackPlugin.GenerateSW());
517500 } else {
518501 config.mode = "development";
@@ -548,7 +531,6 @@ exports[`create-webpack-app cli should generate default project when nothing is
548531
549532import path from "node:path";
550533import { fileURLToPath } from "node:url";
551-
552534import HtmlWebpackPlugin from "html-webpack-plugin";
553535import WorkboxWebpackPlugin from "workbox-webpack-plugin";
554536
@@ -595,7 +577,6 @@ const config = {
595577export default () => {
596578 if (isProduction) {
597579 config.mode = "production";
598-
599580 config.plugins!.push(new WorkboxWebpackPlugin.GenerateSW());
600581 } else {
601582 config.mode = "development";
@@ -633,7 +614,6 @@ exports[`create-webpack-app cli should generate default project when nothing is
633614
634615import path from "node:path";
635616import { fileURLToPath } from "node:url";
636-
637617import HtmlWebpackPlugin from "html-webpack-plugin";
638618import WorkboxWebpackPlugin from "workbox-webpack-plugin";
639619
@@ -680,7 +660,6 @@ const config = {
680660export default () => {
681661 if (isProduction) {
682662 config.mode = "production";
683-
684663 config.plugins!.push(new WorkboxWebpackPlugin.GenerateSW());
685664 } else {
686665 config.mode = "development";
@@ -718,7 +697,6 @@ exports[`create-webpack-app cli should generate default project when nothing is
718697
719698import path from "node:path";
720699import { fileURLToPath } from "node:url";
721-
722700import HtmlWebpackPlugin from "html-webpack-plugin";
723701import WorkboxWebpackPlugin from "workbox-webpack-plugin";
724702
@@ -765,7 +743,6 @@ const config = {
765743export default () => {
766744 if (isProduction) {
767745 config.mode = "production";
768-
769746 config.plugins!.push(new WorkboxWebpackPlugin.GenerateSW());
770747 } else {
771748 config.mode = "development";
@@ -1076,7 +1053,6 @@ exports[`create-webpack-app cli should generate typescript project correctly 1`]
10761053 "description": "My webpack project",
10771054 "devDependencies": {
10781055 "ts-loader": "x.x.x",
1079- "ts-node": "x.x.x",
10801056 "typescript": "x.x.x",
10811057 "webpack": "x.x.x",
10821058 "webpack-cli": "x.x.x",
@@ -1097,9 +1073,7 @@ exports[`create-webpack-app cli should generate typescript project correctly 2`]
10971073
10981074import path from "node:path";
10991075import { fileURLToPath } from "node:url";
1100- import { Configuration } from "webpack";
1101-
1102-
1076+ import { Configuration } from "webpack";
11031077
11041078const __filename = fileURLToPath(import.meta.url);
11051079const __dirname = path.dirname(__filename);
@@ -1141,8 +1115,6 @@ const config : Configuration= {
11411115export default () => {
11421116 if (isProduction) {
11431117 config.mode = "production";
1144-
1145-
11461118 } else {
11471119 config.mode = "development";
11481120 }
@@ -1308,8 +1280,6 @@ exports[`create-webpack-app cli should use css preprocessor and css with postcss
13081280
13091281import path from "node:path";
13101282import { fileURLToPath } from "node:url";
1311-
1312-
13131283import MiniCssExtractPlugin from "mini-css-extract-plugin";
13141284
13151285const __filename = fileURLToPath(import.meta.url);
@@ -1356,7 +1326,6 @@ export default () => {
13561326 if (isProduction) {
13571327 config.mode = "production";
13581328 config.plugins!.push(new MiniCssExtractPlugin());
1359-
13601329 } else {
13611330 config.mode = "development";
13621331 }
@@ -1396,8 +1365,6 @@ exports[`create-webpack-app cli should use to use css preprocessor with postcss
13961365
13971366import path from "node:path";
13981367import { fileURLToPath } from "node:url";
1399-
1400-
14011368import MiniCssExtractPlugin from "mini-css-extract-plugin";
14021369
14031370const __filename = fileURLToPath(import.meta.url);
@@ -1440,7 +1407,6 @@ export default () => {
14401407 if (isProduction) {
14411408 config.mode = "production";
14421409 config.plugins!.push(new MiniCssExtractPlugin());
1443-
14441410 } else {
14451411 config.mode = "development";
14461412 }
0 commit comments