You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Imports used in the stdio.contents don't get a namespace set.
This is a small code snippet where I have a plugin that needs the namespace porperty.
I thought the namespace is set based only on the import's path, so shouldn't be any difference between stdio and physical entryPoints. Unless, there are other limitations.
import*asesbuildfrom"npm:esbuild@0.20.2";constmyPlugin={name: "myPlugin",setup(build){build.onResolve({filter: /.*?/},(args)=>{console.log(args);// args.namespace is empty for both imports used in the stdio content// {// path: "https://deno.land/std@0.185.0/bytes/mod.ts",// importer: "<stdin>",// namespace: "",// resolveDir: "/Users/..",// kind: "import-statement",// pluginData: undefined// }// {// path: "./main.ts",// importer: "<stdin>",// namespace: "",// resolveDir: "/Users/...",// kind: "import-statement",// pluginData: undefined// }});},};constresult=awaitesbuild.build({stdin: {contents: ` import "https://deno.land/std@0.185.0/bytes/mod.ts"; import "./main.ts"; `,resolveDir: Deno.cwd(),},plugins: [myPlugin],outfile: "./test.bundle.js",bundle: true,format: "esm",});console.log(result.outputFiles);esbuild.stop();
The text was updated successfully, but these errors were encountered:
Imports used in the
stdio.contents
don't get a namespace set.This is a small code snippet where I have a plugin that needs the namespace porperty.
I thought the namespace is set based only on the import's path, so shouldn't be any difference between stdio and physical entryPoints. Unless, there are other limitations.
The text was updated successfully, but these errors were encountered: