要在HTTPS上运行create-react-app
,您可以像这样调整package.json
:
{
...
"scripts": {
"start": "react-scripts start", // HTTP (by default)
"startwin": "set HTTPS=true&&npm start", // HTTPS on Windows
"startunix": "HTTPS=true react-scripts start" // HTTPS on Mac/UNIX
},
...
}
是否有办法通过一个命令在两个操作系统上的HTTPS上运行create-react-app
?