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

Duplicate dependencies for async modules with async functions #47

Open
steverep opened this issue May 2, 2024 · 0 comments
Open

Duplicate dependencies for async modules with async functions #47

steverep opened this issue May 2, 2024 · 0 comments

Comments

@steverep
Copy link
Owner

steverep commented May 2, 2024

When using the runtime option, the plugin requires the @babel/runtime helpers outside the async function wrapper. However, babel-loader may have already added the same imports if the module also contains a transpiled async function. The compilation could potentially be better optimized by eliminating the inner dependencies in favor of the outer ones.

Note this should, in theory, be a fairly minimal optimization. This is because the current situation just results in loading the module outside the wrapper, then assigning the same cached module to a different variable.

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

1 participant