BUILD_DIR, since the offical Nodejs buildpack removes any installed development dependencies after it's successfully build.
Telling the Nodejs buildpack to skip pruning will also skip this buildpack's dependency installation.
Append this TypeScript buildpack to your application's buildpack list.
heroku buildpacks:set heroku/nodejs heroku buildpacks:add zidizei/typescript
To re-use the development dependencies that have been installed in the previous Nodejs buildpack, set the following config variables to skip pruning.
heroku config:set NPM_CONFIG_PRODUCTION=false YARN_PRODUCTION=false
heroku-buildpack-tsc will use the
tsconfig.json file found in your application's root directory. You can specify a custom configuration file (e.g. for deployment builds) by setting
TSC_CONFIG in your Config Vars to point to an alternative
tsconfig.json file. (See also TypeScript's configuration inheritance)
heroku config:set TSC_CONFIG='config/tsconfig.prod.json'
You can also set a different
NODE_ENV for the compilation process.
heroku config:set TSC_BUILD_ENV='development'
zidizei/typescript buildpack from the Heroku Buildpack Registry represents the latest stable version of the buildpack. If you'd like to use the source code from this Github repository, you can set your buildpack to the Github URL:
heroku buildpacks:add https://github.com/zidizei/heroku-buildpack-tsc#v2.0
tsconfig.jsonfiles when specifying a custom config file. Instead, TypeScript's configuration inheritance.
TSC_CUSTOM_FILEto specify a different TypeScript configuration file
Copy the snippet above into CLI.