Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants