generated from bazel-contrib/rules-template
-
-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
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"],
)
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request