-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
keep-names to only be applied when name is changed #2605
Comments
I tried to have a stab at this because I was hoping it'd essentially be an extra However, I'm a bit thrown off by the fact that the Disclaimer: I know my way around Go but it's my first time hacking at esbuild, so there's a good chance I'm wrong. 🤞🏻 |
I had script for Vue SFC compilation script that I used to run using tsx but I now get |
This bug seems to prevent tsx from working with puppeteer, bump for fix |
bumping as well... unable to use puppeteer and tsx. Please fix. |
This is also blocking us + would love to see this resolved 👍 |
I was able to resolve this for puppeteer by just creating my own function: await page.evaluateOnNewDocument(() => (window.__name = (func) => func));
// .. All the other evaluates you need |
^ If the above didn't work check out this solution: vuejs/core#8303 |
The following worked for me:
|
it works, thx very much! |
I would like to request for
--keep-names
to only be applied when the name is changed (e.g. via minification).Currently, it applies even if the name is unchanged: https://hyrious.me/esbuild-repl/?version=0.15.10&mode=transform&input=function+name%28%29+%7B%7D&options=--keep-names
This improvement should have the benefit of reducing transformation size and also preserve as much of the original code when possible (which can help with #1438).
The text was updated successfully, but these errors were encountered: