Skip to content
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

ESbuild option --keep-names (keepNames) #6

Closed
furanzujin opened this issue Jun 22, 2022 · 1 comment
Closed

ESbuild option --keep-names (keepNames) #6

furanzujin opened this issue Jun 22, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@furanzujin
Copy link
Contributor

furanzujin commented Jun 22, 2022

Hello there,

In some specific cases, our application needs to check the instance of an object.

eg

if (error instanceof SpecificError) return handleSpecific(error);
throw error;

Though, the current esbuild setup of docker-build-nodejs can append a number to the constructor names.
As described in this esbuild issue, the esbuild option --keep-names avoids this behavior.

Would it be possible to enable this option by default?

@furanzujin furanzujin added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Jun 22, 2022
@furanzujin furanzujin changed the title ESbuild option --keep-name (keepNames) ESbuild option --keep-names (keepNames) Sep 20, 2022
@gautaz
Copy link
Contributor

gautaz commented Sep 20, 2022

I'd rather keep this as an option managed by the user through the "esbuildOptions".
A test has been added to ensure this works, see 15e40e7.

@gautaz gautaz closed this as completed Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants