dropLabels + bundle + default export produces invalid output
{
dropLabels: ['DROP'],
format: "esm",
bundle: true,
}
// original code
const myFunc = ()=> {
DROP: {console.log("drop")}
console.log("keep")
}
export default myFunc
// esbuild output
export {
entry_default as default
};
setting bundle to false
// esbuild output
const myFunc = () => {
console.log("keep");
};
var entry_default = myFunc;
export {
entry_default as default
};
online reproduction
dropLabels + bundle + default export produces invalid output
{ dropLabels: ['DROP'], format: "esm", bundle: true, }setting
bundleto falseonline reproduction