在package.json scripts:
中,我有
...
"prestart": "cd client && yarn build",
"start": "node server",
"heroku-postbuild": "cd client && yarn build"
},
在本地,我想在运行节点服务器之前引用"heroku-postbuild"
中的"prestart"
在子文件夹中构建Webpack:
...
"prestart": "\"yarn run heroku-postbuild\"",
"start": "node server",
"heroku-postbuild": "cd client && yarn build"
},
yarn start
返回
yarn run v1.3.2
$ "yarn run heroku-postbuild"
/bin/sh: 1: yarn run heroku-postbuild: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
"heroku-postbuild"
仅保留用于heroku吗?