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

Support es6 exports from --entry_point #4167

Open
KimlikDAO-bot opened this issue May 30, 2024 · 1 comment
Open

Support es6 exports from --entry_point #4167

KimlikDAO-bot opened this issue May 30, 2024 · 1 comment

Comments

@KimlikDAO-bot
Copy link
Contributor

Support export statements from the entry point file. This will enable many requested features such as

while giving the user precise control.

Given a file

// entry.js
import { m1, m2 } from "./mod"
...
...
export { sym1, ..., symN }
export default symDefault;

When compiled with

google-closure-compiler -O ADVANCED --js mod.js entry.js --entry_point entry.js --module_resolution NODE

should output a file containing export { sym1, ..., symN, symDefault as default}.

Currently, this behavior can be achieved by assigning each exported symbol to globalThis in a preprocessing step and then replacing each such assignment in the compiled file to an export statement in a postprocessing step.

@amitdhiman000
Copy link

Closure compiler is stripping off the default exports. Facing this problem with emscripten generated ES6 code.
When are we getting this feature ? Or at-least a workaround ?

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