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: Also detect esbuild Re-exports #73

Closed
hyrious opened this issue Aug 20, 2022 · 1 comment
Closed

Feature Request: Also detect esbuild Re-exports #73

hyrious opened this issue Aug 20, 2022 · 1 comment

Comments

@hyrious
Copy link

hyrious commented Aug 20, 2022

// pattern:
__reExport(foo_exports, require("x"), module.exports);
__reExport(bar_exports, require("y"));

REPL

Consideration: when minified, should this code be detected?:

o(e,require("x"),module.exports);
o(f,require("y"));

Consideration2: since esbuild has not been 1.0, this pattern may still change in the future, so you may not in a hurry to implement that.

Related issue: evanw/esbuild#2486

@evanw
Copy link

evanw commented Aug 22, 2022

FWIW I don't think this is a good idea. This would likely be brittle at least due to how esbuild renames identifiers, so checking for __reExport wouldn't work in 100% of cases. It wouldn't work for minified code but also the identifier might be _reExport2, etc. This should probably be fixed on esbuild's end instead: evanw/esbuild#2486 (comment)

@hyrious hyrious closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2023
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