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

Feature request: allow setting esbuild keepNames options #622

Open
canac opened this issue Aug 21, 2021 · 1 comment
Open

Feature request: allow setting esbuild keepNames options #622

canac opened this issue Aug 21, 2021 · 1 comment

Comments

@canac
Copy link

canac commented Aug 21, 2021

- Do you want to request a feature or report a bug?

Feature request

- What is the current behavior?

My app uses a module that checks the functions' name property during validation (https://github.com/graphql-compose/graphql-compose-mongoose/blob/e4b916bf4c7a2e8857345ac9476d4e76bc25e030/src/resolvers/findById.ts#L42-L44). By default, esbuild renames functions during bundling, which changes their name property, which causes that check to fail.

- What is the expected behavior?

There is --keep-names option in esbuild that keeps function names from being changed, which is exactly what I need. Can the zip-it-and-ship-it esbuild bundler expose that option?

@natevw
Copy link

natevw commented Jul 31, 2023

Yes, this would also enable working around this issue with older versions of node-fetch which e.g. googleapis still rely on: node-fetch/node-fetch#784 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants