js: Pass tsconfig.json to esBuild

Note that esBuild only inspects/honors certain fields.
See https://esbuild.github.io/content-types/#tsconfig-json.

Fixes #11232
This commit is contained in:
Joe Mooring
2023-07-11 13:01:52 -07:00
committed by Bjørn Erik Pedersen
parent 5bec50838c
commit f1886f8c37
2 changed files with 40 additions and 10 deletions

View File

@@ -86,6 +86,7 @@ func (t *buildTransformation) Transform(ctx *resources.ResourceTransformationCtx
opts.resolveDir = t.c.rs.Cfg.BaseConfig().WorkingDir // where node_modules gets resolved
opts.contents = string(src)
opts.mediaType = ctx.InMediaType
opts.tsConfig = t.c.rs.ResolveJSConfigFile("tsconfig.json")
buildOptions, err := toBuildOptions(opts)
if err != nil {