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
I maintain a large library that currently uses Rspack to bundle our browser bundle. This bundle uses dynamic import() calls for code splitting. We'd like to ship a new bundle to be consumed by other bundlers, instead of running in the browser. However, we'd also like to retain the dynamic import() statements so they can be correctly split by the consuming bundler. Currently, even when emitting ESM Rspack will convert these imports to __webpack_require__ calls, which other bundlers are not able to correctly process.
Essentially, given the following index.js:
import a from './a.js';
import b from './b.js';
import('./c.js');
I want index.js to contain the code from a.js and b.js, and a bare import('./c.js').
Furthermore, given the following c.js, I'd expect d.js and e.js to be bundled into the c.js chunk:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I maintain a large library that currently uses Rspack to bundle our browser bundle. This bundle uses dynamic
import()
calls for code splitting. We'd like to ship a new bundle to be consumed by other bundlers, instead of running in the browser. However, we'd also like to retain the dynamicimport()
statements so they can be correctly split by the consuming bundler. Currently, even when emitting ESM Rspack will convert these imports to__webpack_require__
calls, which other bundlers are not able to correctly process.Essentially, given the following
index.js
:I want
index.js
to contain the code froma.js
andb.js
, and a bareimport('./c.js')
.Furthermore, given the following
c.js
, I'd expectd.js
ande.js
to be bundled into thec.js
chunk:Beta Was this translation helpful? Give feedback.
All reactions