Unbundled esm output #806
Unanswered
IanDuncanson
asked this question in
Q&A
Replies: 1 comment
-
For now, bundleless mode will process a full compilation process just like the bundle mode to share and reuse the pipeline of Rspack which could make the two mode isomorphic. The We'll try to make it prettier, maybe not as pretty as Babel or SWC as it will go through the compilation pipeline at least, but we'll give it a try. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We currently use babel to transpile our typescript library projects to unbundled js (esm), and it does a good job of creating a nice, clean looking output, similar to what we would see if we used TSC, or SWC with some basic settings. I am wondering why rslib in unbundled mode seems to convert all imports (not just externals) to __WEBPACK_EXTERNAL_MODULE_xyz?
As an example, if my Typescript file has the following import -
import { logRequest } from './logger';
then babel (and SWC) will pretty much copy that line straight over to the esm unbundled output file. RSLib however seems to want to convert this into
import * as WEBPACK_EXTERNAL_MODULE__logger_mjs_dfc7ebda from "./logger.mjs";
Am I missing some config/setting here, do I just not understand what the purpose of RSLib is, is is this just the way RSLib does things?
Beta Was this translation helpful? Give feedback.
All reactions