You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
preserve import() when import() is supported in that Node.js version in CJS. (BLOCK: can't distinguish static / dynamic from external callback except adding new information) Allow Dynamic Import in `commonjs2` webpack/webpack#16272
(ESM) Entry module demanding not to be bailed out.
Entry module must not trigger concatenation bail out (such as contains eval expression), otherwise it will break the current "modern-module"'s ESM export premise.
Bundler supports
Tracking the bundler supports for the optimal output (webpack1 and Rspack).
(ESM) Tree shakable export
(ESM) ESM export should be tree-shakable.
(ESM) ESM output won't break by scope isolation when bundling module bailout from concatenation.
(ESM) Remove unnecessary webpack exports runtime
(ESM) Force concatenation single module
(ESM) Externals
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
andimport()
should be leave unchanged.support
"module-import"
external typeRspack misaligned: Port fix: only render init code when need moduleRemapping webpack/webpack#18338. However, the simple module remapping runtime in Rspack (https://github.com/web-infra-dev/rspack/blob/main/crates/rspack_core/src/external_module.rs#L266-L269) is totally unused now.
dynamic external introduce webpack runtime
In concatenated module, static external module namespace import re-assign breaks tree shaking (demo)
Not work with star export from external module (bundleless) Preserve star exports for externalized dependencies in module output webpack/webpack#15270
preserve
import()
whenimport()
is supported in that Node.js version in CJS. (BLOCK: can't distinguish static / dynamic from external callback except adding new information) Allow Dynamic Import in `commonjs2` webpack/webpack#16272(ESM) Avoid using namespace import for external module for better readability P0
(ESM) Dynamic import (Chunk splitting) P1
Static analysis is not possible due to the public path at runtime.
(ESM) Preserve CSS Import
(ESM) Node.js Shims
node-module
shim rspack#7465(CJS) Support static analyzable export.
(CJS / ESM) preserve
require
require
andrequire.resolve
require(...)
should be either behave like esbuild (sniff and throw as a fallback) or be shimmed withcreateRequire
.require.resolve(...)
should be either behave like esbuild (sniff and throw as a fallback) or be shimmed withcreateRequire
.require(...)
with externals should work like__non_webpack_require__
require.resolve(...)
should preserve as-is.require('./' + expression + '.js')
like dynamic require with expression. (BLOCK: https://github.com/microsoft/rushstack/blob/main/webpack/preserve-dynamic-require-plugin/README.md not available in Rspack assucceedModule
is readonly in JS side)(ESM) Re-export with property access or eval
(ESM) Multiple entries P2
Export in library works only for last entry module
(ESM) Entry module demanding not to be bailed out.
"modern-module"
's ESM export premise.non-Rslib related ESM feature support in Rspack
Footnotes
Reference: https://github.com/webpack/webpack/issues/17121 ↩
The text was updated successfully, but these errors were encountered: