https://zhuanlan.zhihu.com/p/434394325
node_modules目录下,查找 react-scripts/bin/react-scripts.js
其实,最终引用的还是 react-scripts/scripts下的文件
package.json
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test"
"eject": "react-scripts eject"
// npm run eject后的 scripts
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"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.