I’m using Meteor with the Rspack integration and I’m trying to understand how the build pipeline is split between the modern and legacy web architectures.
What I tested:
- I set Rspack
jsc.targettoesNext. - Then I ran
meteor buildand inspected the output bundle underbundle/programs/.
What I observed:
- In
programs/web.browser(modern), the generated JS still contains lots of modern syntax such as??(and other ES2020+ features), which matches theesNextexpectation. - In
programs/web.browser.legacy(legacy), those modern syntaxes (e.g.??) are completely absent. It looks like everything is transpiled down to ES5.
Questions:
- Is it expected that Rspack config (like
jsc.target/env) only affects the modern client build (web.browser), while the legacy build (web.browser.legacy) is still handled by Meteor’s legacy toolchain? - If yes, could this be documented more explicitly? I suspect many users assume Rspack config applies to both modern and legacy outputs.
- Looking forward: is there a plan to let Rspack also take over
web.browser.legacy? For example, introducing something likeMeteor.modern()(or a similar API) so developers can switch Rspack targets/jsc.target/env between modern and legacy builds explicitly.
Thanks in advance for any clarification!