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

Bundler support track #45

Open
30 of 34 tasks
fi3ework opened this issue Jul 26, 2024 · 1 comment
Open
30 of 34 tasks

Bundler support track #45

fi3ework opened this issue Jul 26, 2024 · 1 comment
Assignees

Comments

@fi3ework
Copy link
Member

fi3ework commented Jul 26, 2024

Bundler supports

Tracking the bundler supports for the optimal artifact (webpack1 and Rspack).

CJS support

ESM artifacts won't break by scope isolation when bundling module bailout from concatenation (usually CJS module).

Tree shakable export

ESM artifacts should be tree-shakable.

Remove unnecessary webpack exports runtime

Externals P0

Externalized module import / dynamic import will introduce redundant runtime in webpack / Rspack. Dynamic import will be hoisted to the top level (webpack/webpack#17986). Furthermore, the import and import() should be leave unchanged.

Dynamic import (Chunk splitting) P1

Can't be static analysis because of the public path runtime.

Preserve CSS Import

CSS import statement will be extracted out.

Node.js Shims

Miscellaneous

require

require and require.resolve

  • ESM:
    • require(...) should be either behave like esbuild (sniff and throw as a fallback) or be shimmed with createRequire.
    • require.resolve(...) should be either behave like esbuild (sniff and throw as a fallback) or be shimmed with createRequire.
  • CJS:

Extra runtime when bundling single module

Re-export with property access or eval

Multiple entries P2

Export in library works only for last entry module

Footnotes

  1. Reference: https://github.com/webpack/webpack/issues/17121

@Timeless0911 Timeless0911 pinned this issue Jul 26, 2024
@fi3ework
Copy link
Member Author

fi3ework commented Aug 12, 2024

🚧 ESM output quality track

Not aim to strict alignment with esbuild, compare the differences between esbuild artifacts and create a more compact output.

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