diff --git a/go.mod b/go.mod index 2e60b203023..9077ae2b61a 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/disintegration/gift v1.2.1 github.com/dlclark/regexp2 v1.4.0 // indirect github.com/dustin/go-humanize v1.0.0 - github.com/evanw/esbuild v0.8.17 + github.com/evanw/esbuild v0.8.39 github.com/fortytw2/leaktest v1.3.0 github.com/frankban/quicktest v1.11.2 github.com/fsnotify/fsnotify v1.4.9 diff --git a/go.sum b/go.sum index ea3d00e7eda..4c24c028968 100644 --- a/go.sum +++ b/go.sum @@ -180,6 +180,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanw/esbuild v0.8.17 h1:kwPgM6nrZrSUqI1rlgNG9vv5u9cAMaz6HmZ+Ns+3cfQ= github.com/evanw/esbuild v0.8.17/go.mod h1:y2AFBAGVelPqPodpdtxWWqe6n2jYf5FrsJbligmRmuw= +github.com/evanw/esbuild v0.8.39 h1:/kOe+5zUXSzB2y2m/BxgNsQ5wpgbcGU2uE6MBVSleww= +github.com/evanw/esbuild v0.8.39/go.mod h1:y2AFBAGVelPqPodpdtxWWqe6n2jYf5FrsJbligmRmuw= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= diff --git a/resources/resource_transformers/js/options.go b/resources/resource_transformers/js/options.go index 921e944d402..02d8c959cb1 100644 --- a/resources/resource_transformers/js/options.go +++ b/resources/resource_transformers/js/options.go @@ -391,9 +391,11 @@ func toBuildOptions(opts Options) (buildOptions api.BuildOptions, err error) { Tsconfig: opts.tsConfig, + // Note: We're not passing Sourcefile to ESBuild. + // This makes ESBuild pass `stdin` as the Importer to the import + // resolver, which is what we need/expect. Stdin: &api.StdinOptions{ Contents: opts.contents, - Sourcefile: opts.sourcefile, ResolveDir: opts.resolveDir, Loader: loader, },