Thank you very much. I’m glad to hear the upgrade meets the goals behind the work: improving build times, reducing bundle size, and staying flexible enough to support any modern setup and configuration.
It’s a relief to see this effort paying off for each of you. I appreciate the support and feedback, and especially the patience and trust. This kind of upgrade has many edges to consider, and the commitment is to keep iterating and make sure it serves everyone well.
But Claude and I were able to pass hooks and schemas and other objects through the Meteor object into the Atmosphere packages, and once we settled on that pattern, everything fell into place.
Repack doesn’t completely handle the Atmosphere build pipeline for packages/*
I tried to install Cornerstone3D in packages/dicom, so it could be enabled as an optional module, but that did not work. Web workers weren’t registered, codexes couldn’t be accessed, etc. Eventually had to install Cornerstone in the main app, and implement ad-hoc tree-shaking if DICOM support isn’t needed.
Mainly, the reason is that Meteor packages use their own pipeline to keep the Rspack integration simple and reliable. While deeper Rspack integration in Meteor packages would be nice, I recommend moving to npm packages to gain the benefits of today’s standard, feature-ready Node/Web packaging.
I think part of the positive experience with the Rspack upgrade comes from delegating to a modern, faster bundler in Meteor 3.4. That shift follows a modern-first mindset, embracing established workflows. The same applies to moving app Atmosphere packages to npm to unlock these benefits.
With npm packages, it’s easy to bring them into the Rspack pipeline and ensure everything is registered and configured as expected, just like at app level. You also get npm ecosystem gains like caching and local management tools (linking, workspaces, lerna, pnpm, etc.). Every meteor/* import in your npm packages will still resolve externally, and Meteor will inject them properly. Besides, you avoid passing anything to the Meteor property for cross-package communication as you suggested to do before, everything is managed from the same common NPM ecosystem.
In my apps, I use a lerna setup with npm packages under ./packages. My Rspack config forces those packages to be compiled by Rspack because they use modern syntax, so that I don’t need to create distributable versions myself (see Meteor.compileWithRspack, where you can pass a package name or a regex for all your branded packages). It’s like keeping packages at the Atmosphere level, but with the extra features the npm ecosystem offers.
With this, your Meteor app moves to a more standardized and portable setup. Atmosphere packages remain for Meteor core needs, existing community packages, or cases that must hook into the Meteor bundler (addFiles, assets management, and other specifics).
So, regarding your suggestion: it’s worth considering and we will do, but I prefer to prioritize on modern-first solutions, and keep backward-compatibility paths simple. We can explore improvements for Atmosphere packages, but that tends to add complexity (I’ve tried before hardly) and keeps the community tied to older paths instead of adopting newer ones across the framework and JS standards. We’ve been living with Meteor-specifics for a long time, even promoting their expansion in previous directions, which kept us distant from the wider ecosystem. I hope by embracing the new, it can change that, as we’re already seeing with the latest upgrades.