Library exports
Opened this issue · 2 comments
tmisirpash commented
In Webpack, it's possible to use output.library.export to choose the export of the namespace object that will be exposed as a library. For example, if my file is
export function namedExport(): string {
return "namedExport";
}
export default function defaultExport(): string {
return "defaultExport";
}
I can add
library: {
name: 'MyLibrary',
type: 'var',
export: 'default',
},
and my bundle will not include the named export. Is there something similar that can be done in esbuild with the iife
format?
hyrious commented
tmisirpash commented
Thanks for the nice example. This is almost what I need -- my main issue is that the bundle would still contain the named exports.