TypescriptプロジェクトをHerokuにデプロイする
普通にpushすればOK。
デプロイ時に自動でbuildコマンドを検知して実行してくれる。
-----> Installing dependencies
Installing node modules (yarn.lock)
-----> Build
Running build (yarn)
yarn run v1.22.10
$ tsc -p tsconfig.json && tsc-alias -p tsconfig.json
=== tsc-alias starting ===
Info: 13 files were affected!
Done in 7.28s.
最初、[["heroku-postbuild": "yarn run build"]]を実行するようにしていたが、Herokuのログを確認すると↓のようになっておりpostbuildは不要だということに気づいた。
-----> Build
Detected both "build" and "heroku-postbuild" scripts
Running heroku-postbuild (yarn)
VercelもHerokuも手軽にデプロイ出来るのはとても良い。