28
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Firebase Functions x TypeScript デバッグをHotReload

Last updated at Posted at 2020-02-03
  • 2020/06/30
    • よりスマートな方法を記述しました。
    • 以前記述していた tsc --watch を併用する方法では、tscのプロセスが不正に残り続けてしまうことがありました。

更新版

npm i -D tsc-watch

package.json{
{
  "scripts": {
    "emulators": "tsc-watch --onFirstSuccess 'firebase emulators:start --only firestore,functions'",
    "shell": "tsc-watch --onFirstSuccess 'firebase functions:shell'",
  }
}

npm run shell
npm run emulators

非推奨な方法

package.json
{
  "scripts": {
    "watch": "tsc --watch",
    "shell": "npm run watch & firebase functions:shell",
    "start": "npm run shell"
  }
}

npm start

28
4
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
28
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?