Open MariusVatasoiu opened 3 months ago
I just have to special case importer == "<stdin>" && namespace == ""
to instead use $resolveDir/__stdin.ts
as the importer with a namespace of file
.
I also opened an issue on esbuild: https://github.com/evanw/esbuild/issues/3726
I think one extra check would be args.resolveDir !== ""
. If you're omitting the resolveDir: Deno.cwd()
option, args.resolveDir
will be an empty string.
If I use the
stdin
option to set the entrypoint, I get the following error:This is the code snippet used:
Esbuild doesn't set the namespace for stdin entrypoint. The object received by the plugin looks like this:
Might be as well an esbuild bug, but not sure if the loader can handle this case.