What is the current behavior?
Currently there is no way to customize the environment variables that are set during the tsc execution.
Describe the feature
I am attempting to adopt ts_project on my very large Typescript codebase. In order to use tsc without running out of memory, we need to use the --max-old-space-size on the node process. ts_project does not currently provide a way to do this. I propose adding an env option to ts_project that gets passed though to the underlying action run.
Currently, our setup looks like this:
typescript_bin.tsc(
name = "src_transpiled",
args = [
"-p",
"tsconfig.json",
],
chdir = package_name(),
out_dirs = ["dist"],
srcs = glob([
"src/**/*"
]) + [
"tsconfig.json",
],
env = {
"NODE_OPTIONS": "--max-old-space-size=10240",
},
visibility = ["//visibility:public"],
)
What is the current behavior?
Currently there is no way to customize the environment variables that are set during the tsc execution.
Describe the feature
I am attempting to adopt ts_project on my very large Typescript codebase. In order to use
tscwithout running out of memory, we need to use the--max-old-space-sizeon the node process. ts_project does not currently provide a way to do this. I propose adding anenvoption to ts_project that gets passed though to the underlying action run.Currently, our setup looks like this: