https://zhuanlan.zhihu.com/p/434394325

node_modules目录下,查找 react-scripts/bin/react-scripts.js
其实,最终引用的还是 react-scripts/scripts下的文件
image.png

package.json

  1. "start": "react-scripts start",
  2. "build": "react-scripts build",
  3. "test": "react-scripts test"
  4. "eject": "react-scripts eject"
  5. // npm run eject后的 scripts
  6. "start": "node scripts/start.js",
  7. "build": "node scripts/build.js",
  8. "test": "node scripts/test.js"

eject之后,不能恢复命令行,是因为 node_modules里面的 react-scripts已经被删除了。
替代的配置,就是弹出的 config 和 scripts目录,需要自己来维护。

关闭 socket

https://github.com/facebook/create-react-app/issues/1940
After ejecting and setting hot: false in /scripts/start.js it stills include the sockjs-node/ websocket.