Skip to content

Bundler support track #45

Open
Open
@fi3ework

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions