mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-05-18 04:24:19 +08:00
2
packages/react-scripts/scripts/start.js
vendored
2
packages/react-scripts/scripts/start.js
vendored
@@ -174,7 +174,7 @@ function addMiddleware(devServer) {
|
||||
// - /index.html (served as HTML5 history API fallback)
|
||||
// - /*.hot-update.json (WebpackDevServer uses this too for hot reloading)
|
||||
// - /sockjs-node/* (WebpackDevServer uses this for hot reloading)
|
||||
// Tip: use https://www.debuggex.com/ to visualize the regex
|
||||
// Tip: use https://jex.im/regulex/ to visualize the regex
|
||||
var mayProxy = /^(?!\/(index\.html$|.*\.hot-update\.json$|sockjs-node\/)).*$/;
|
||||
devServer.use(mayProxy,
|
||||
// Pass the scope regex both to Express and to the middleware for proxying
|
||||
|
||||
Reference in New Issue
Block a user