-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exporting default type should remove in build output #316
Comments
Thanks for reporting this. This case is particularly tricky because esbuild currently treats types as comments, so it can't tell that I still need to investigate what specifically the TypeScript compiler does in this case before I know how to fix this in esbuild. For now, you can work around this by using an export clause instead: export { ReaderConfig as default } This export syntax should be handled correctly by esbuild. |
For my future reference: This decision of whether or not to drop the function isValueAliasDeclaration(node: Node): boolean {
switch (node.kind) {
...
case SyntaxKind.ExportAssignment:
return (<ExportAssignment>node).expression && (<ExportAssignment>node).expression.kind === SyntaxKind.Identifier ?
isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol) :
true;
}
return false;
} So there is a special case for |
This should be fixed in version 0.6.17. |
on build output the type didnt remove, i think this should be remove since the output is plain javascript
./src/types.ts
./src/index.ts
build-script.js
actual output
The text was updated successfully, but these errors were encountered: