fix: Candidate fix for https://github.com/aspect-build/rules_esbuild/issue…#252
fix: Candidate fix for https://github.com/aspect-build/rules_esbuild/issue…#252JonathanPerry651 wants to merge 3 commits into
Conversation
|
|
|
alexeagle
left a comment
There was a problem hiding this comment.
Yes it's commonly the case when (.js,.ts) file pairs are accidentally provided as inputs, that the developer didn't intend for the .ts files to be there. If they have a transpilation setup in their ts_project (not emitDeclarationOnly) then they probably meant to use the transpiled files.
But it's not clear to me that all users would want this behavior.
If esbuild is configured with a plugin that transpiles TS files, it's possible they intended that plugin should get the path/to/some.ts file in the execroot, even though path/to/some.js is provided there as well.
@jbedard what do you think - is that a remote possibility that warrants making this configurable?
|
@JonathanPerry651 do you understand why the .ts file is available at all? Ideally sandboxing would prevent that file from even being accessible to esbuild. Do you have sandboxing off? |
I think we can probably merge this as-is and maybe allow opt-out if we run into issues. My main concern would be performance, not lost functionality. |


Candidate fix for #251.
Changes are visible to end-users: yes
Test plan