Skip to content

Commit 58d36c2

Browse files
author
Morten N.O. Henriksen
committed
Fix dev server config
1 parent 5bef914 commit 58d36c2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/react-scripts/config/webpackDevServer.config.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ module.exports = function (proxy, allowedHost) {
8484
path: sockPath,
8585
port: sockPort,
8686
},
87-
// It is important to tell WebpackDevServer to use the same "publicPath" path as
88-
// we specified in the webpack config. When homepage is '.', default to serving
89-
// from the root.
90-
// remove last slash so user can land on `/test` instead of `/test/`
91-
publicPath: paths.publicUrlOrPath.slice(0, -1),
87+
dev: {
88+
// It is important to tell WebpackDevServer to use the same "publicPath" path as
89+
// we specified in the webpack config. When homepage is '.', default to serving
90+
// from the root.
91+
// remove last slash so user can land on `/test` instead of `/test/`
92+
publicPath: paths.publicUrlOrPath.slice(0, -1),
93+
},
9294

9395
https: getHttpsConfig(),
9496
host,

0 commit comments

Comments
 (0)