Skip to content

Commit ae94d81

Browse files
fix(init): use built-it resolve logic for host
1 parent c76ab1c commit ae94d81

File tree

6 files changed

+5
-13
lines changed

6 files changed

+5
-13
lines changed

.changeset/orange-brooms-admire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-webpack-app": patch
3+
---
4+
5+
Use default logic to determine the host for webpack-dev-server.

packages/create-webpack-app/templates/init/default/webpack.config.js.tpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const config = {
2727
},<% if (devServer) { %>
2828
devServer: {
2929
open: true,
30-
host: "localhost",
3130
},<% } %>
3231
plugins: [<% if (htmlWebpackPlugin) { %>
3332
new HtmlWebpackPlugin({

packages/create-webpack-app/templates/init/react/webpack.config.js.tpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const config = {
2727
},<% if (devServer) { %>
2828
devServer: {
2929
open: true,
30-
host: "localhost",
3130
},<% } %>
3231
plugins: [<% if (htmlWebpackPlugin) { %>
3332
new HtmlWebpackPlugin({

packages/create-webpack-app/templates/init/svelte/webpack.config.js.tpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const config = {
2727
},<% if (devServer) { %>
2828
devServer: {
2929
open: true,
30-
host: "localhost",
3130
},<% } %>
3231
plugins: [<% if (htmlWebpackPlugin) { %>
3332
new HtmlWebpackPlugin({

packages/create-webpack-app/templates/init/vue/webpack.config.js.tpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const config = {
2828
},<% if (devServer) { %>
2929
devServer: {
3030
open: true,
31-
host: "localhost",
3231
},<% } %>
3332
plugins: [
3433
new VueLoaderPlugin(),<% if (htmlWebpackPlugin) { %>

test/create-webpack-app/init/__snapshots__/init.test.js.snap.webpack5

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ const config = {
8585
},
8686
devServer: {
8787
open: true,
88-
host: "localhost",
8988
},
9089
plugins: [
9190
// Add your plugins here
@@ -393,7 +392,6 @@ const config = {
393392
},
394393
devServer: {
395394
open: true,
396-
host: "localhost",
397395
},
398396
plugins: [
399397
new HtmlWebpackPlugin({
@@ -480,7 +478,6 @@ const config = {
480478
},
481479
devServer: {
482480
open: true,
483-
host: "localhost",
484481
},
485482
plugins: [
486483
new HtmlWebpackPlugin({
@@ -565,7 +562,6 @@ const config = {
565562
},
566563
devServer: {
567564
open: true,
568-
host: "localhost",
569565
},
570566
plugins: [
571567
new HtmlWebpackPlugin({
@@ -652,7 +648,6 @@ const config = {
652648
},
653649
devServer: {
654650
open: true,
655-
host: "localhost",
656651
},
657652
plugins: [
658653
new HtmlWebpackPlugin({
@@ -739,7 +734,6 @@ const config = {
739734
},
740735
devServer: {
741736
open: true,
742-
host: "localhost",
743737
},
744738
plugins: [
745739
new HtmlWebpackPlugin({
@@ -890,7 +884,6 @@ const config = {
890884
},
891885
devServer: {
892886
open: true,
893-
host: "localhost",
894887
},
895888
plugins: [
896889
new HtmlWebpackPlugin({
@@ -1009,7 +1002,6 @@ const config = {
10091002
},
10101003
devServer: {
10111004
open: true,
1012-
host: "localhost",
10131005
},
10141006
plugins: [
10151007
new HtmlWebpackPlugin({
@@ -1220,7 +1212,6 @@ const config = {
12201212
},
12211213
devServer: {
12221214
open: true,
1223-
host: "localhost",
12241215
},
12251216
plugins: [
12261217
new VueLoaderPlugin(),

0 commit comments

Comments
 (0)