The object to use as the module
Symbol
OnLoadResultObject.exports
exports: Record<string, unknown>
// In your loader
builder.onLoad({ filter: /^hello:world$/ }, (args) => {
return { exports: { foo: "bar" }, loader: "object" };
});
// In your script
import {foo} from "hello:world";
console.log(foo); // "bar"