meteor-modern-build-stack
Skill10 starsChanged 3 months agoMITView on GitHub
Use when configuring or tuning the Meteor 3 modern build stack: SWC transpiler, SWC-based minifier, modern @parcel/watcher, web-arch skipping in development, .meteorignore, and Rspack integration. Triggers on package.json "meteor": { "modern": true }, .swcrc, swc.config.js, [Transpiler] Used Babel Fallback logs, rspack.config.js, rspack.config.ts, defineConfig from @meteorjs/rspack, Meteor.compileWith* helpers, Meteor.extendConfig, Meteor.extendSwcConfig vs Meteor.replaceSwcConfig, Meteor.splitVendorChunk, Meteor.persistDevFiles, Meteor.disablePlugins, Meteor.enablePortableBuild, HtmlRspackPlugin customization, RSPACK_DEVSERVER_PORT, TOOL_NODE_FLAGS, pnpm workspaces, Rspack 2, skeleton selection, PWA, Workbox and service-worker build setup. Use this skill when asked about SWC vs Babel or Rspack configuration. Route existing-app bundler migration to migrate-to-rspack, Blaze PWA scaffolding to meteor-blaze, declarations to meteor-typescript, and jam:offline data to meteor-community-packages.
- Installs packages
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- wekan/wekanedited, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- wekan/wekan★ 21k97% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- release-publishingSkill
- skill-gap-auditSkill
- skill-maintenanceSkill
- meteor-accountsSkill
- meteor-blazeSkill
- meteor-cli-installationSkill
- meteor-community-packagesSkill
- meteor-debuggingSkill
- meteor-deploymentSkill
- meteor-methodsSkill
- meteor-mongo-minimongoSkill
- meteor-nativeSkill
- meteor-pubsubSkill
- meteor-reactSkill
- meteor-securitySkill
- meteor-testingSkill
- meteor-typescriptSkill
- migrate-to-meteor-3Skill
- migrate-to-rspackSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 89
Look for [Transpiler] Used Babel for <file> Fallback.
- Very specific: line 103
Check .meteor/versions, package.json and lockfile.
- Very specific: line 105
Use the release pairings and dependency minimums.
- Very specific: line 126
Only the first found is used.
- Very specific: line 151
Use defineConfig from @meteorjs/rspack.
- Very specific: line 177
Do not copy .gitignore into .meteorignore blindly.
- Distinctive: line 242
Remove a custom Atmosphere minifier only because Rspack is enabled.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Modern build stack
The modern build stack is two independent tracks. Enable either or both.
- Meteor Bundler Optimizations (Meteor 3.3+). One flag, SWC replaces
Babel, SWC minifier replaces Terser,
@parcel/watcherreplaces the legacy watcher, development skips legacy archs. - Rspack Bundler Integration (Meteor 3.4+). Atmosphere package delegates app-code compilation to Rspack. Tree shaking, ESM, code splitting via HTTP, modern bundler plugins.
Current meteor create application skeletons ship both enabled.
Purposefully small or compatibility-oriented skeletons, including minimal
and legacy, may omit Rspack or the modern flag. Inspect the generated
package.json and .meteor/packages instead of inferring features only from
the Meteor version. For existing apps, enable optimizations first, then add
Rspack once the app code is standards-clean.
Enable Meteor Bundler Optimizations
Add to package.json:
"meteor": {
"modern": true
}This enables SWC, the SWC minifier, the modern watcher, and dev-mode web arch skipping. Each falls back to legacy when something is incompatible, so this is backward compatible.
Opt out of pieces:
"meteor": {
"modern": {
"transpiler": false,
"minifier": false,
"watcher": false,
"webArchOnly": false
}
}Or scope SWC: transpiler.excludeApp, transpiler.excludeNodeModules,
transpiler.excludePackages, transpiler.excludeLegacy. Accept true or
an array of paths/regexes.
Verbose transpiler logs to diagnose Babel fallbacks:
"meteor": {
"modern": {
"transpiler": { "verbose": true }
}
}Look for [Transpiler] Used Babel for <file> Fallback. The common cause is
nested imports; see references/meteor-bundler-optimizations.md.
Enable Rspack integration
meteor add rspackOn first run the package installs the project-level Rspack setup. App code
moves to Rspack; Meteor still handles Atmosphere packages and produces the
final bundle. Requires entry points in package.json and no nested imports
in app code. To migrate an existing app, use the migrate-to-rspack skill.
Check .meteor/versions, package.json and lockfile. The RC pairs
rspack@1.4.0-rc360.0 with @meteorjs/rspack@3.0.0-rc.0, core/CLI 2.2.7.
Use the release pairings
and dependency minimums.
Rspack transpiles TypeScript. Use meteor-typescript for declarations and
checking; see
checker boundaries.
Scaffolds, PWA and offline behavior
For new-app skeleton selection or framework-neutral PWA/Workbox setup, read
scaffolds and service workers.
Meteor 3.6 (verified on 3.6-beta.0) adds separate --pnpm workspace and
--pwa Blaze starters; neither converts an existing app. A worker caches
shell/assets, not offline Meteor data. Existing bundler migrations remain
owned by migrate-to-rspack.
SWC config files
.swcrc > swc.config.js > swc.config.tsOnly the first found is used. Use .swcrc for static config, swc.config.js
for environment-driven config. The file name must be exactly .swcrc, not
config.swcrc.
Install @swc/helpers to externalize SWC helpers (smaller bundles):
meteor npm install --save @swc/helpersNew apps ship with this preinstalled. Normally no further setup is needed;
Meteor's pipeline detects it and emits imports instead of inlining. If only a
production or legacy bundle fails on a helper import, inspect Rspack-generated
and final Meteor output before changing .swcrc or adding manual imports.
On a resolved SWC carrier, ERR_SWC_NATIVE_CACHE needs an absolute owned
SWC_NATIVE_BINDING_CACHE on an executable filesystem. Build-cache cleanup
will not repair it; see meteor-debugging.
Rspack config files
rspack.config.js | rspack.config.ts | rspack.config.mjs | rspack.config.cjsUse defineConfig from @meteorjs/rspack. The function receives a
Meteor parameter with build flags and helpers. See
references/rspack-config.md for the full table and the most useful
helpers (extendSwcConfig, compileWithRspack, compileWithMeteor,
extendConfig, splitVendorChunk, persistDevFiles, disablePlugins,
enablePortableBuild, setCache).
.meteorignore
Skip directories the bundler does not need to watch. Same syntax as
.gitignore. Place at any depth; rules apply to the subtree.
docs/
design/
cypress/
scripts/
*.md
!README.mdFor per-command rules, set the METEOR_IGNORE env var.
On the 3.6-beta.3 pairing, read the test-ignore boundaries for ordered user exceptions, included parents and separate generated rules.
Do not copy .gitignore into .meteorignore blindly. Exclude unrelated large
trees that Meteor does not need, but never match the active Rspack build context:
Meteor consumes its generated main and test modules during final assembly.
Rspack also generates _build/, public/build-assets/,
public/build-chunks/, and private/build-assets/. Include active suffixed
variants such as build-assets-test and build-chunks-app-test on Meteor
3.5.2, plus custom context names. Add those paths to the
native ignore configuration of recursive formatters, linters, typecheckers,
test discovery, coverage, and IDEs. .gitignore alone is insufficient.
Minifier ownership
"modern": true selects Meteor's modern standard minifier. A third-party
Atmosphere package that provides the JavaScript minifier remains part of the
final Meteor assembly even when Rspack compiles app modules. Inventory custom
minifier packages before migration. Keep or remove one only after comparing
production output, source maps, build time, and runtime behavior.
Production legacy builds
For separate mainModule.legacy or exact architecture entries on 3.6-beta.3
or 3.6-rc.0,
read architecture entry points.
Earlier integrations retain their shared-client behavior.
Dev skips web.browser.legacy and web.cordova with "modern": true.
Production still ships legacy by default. To drop legacy in production
too, add modern to .meteor/platforms:
server
browser
modernMemory limits
For tool-process OOM or growing watch memory, use the version-specific heap and cache checks.
Multiple instances
Meteor 3.5.2 separates development, normal test, and full-app test output
within one context (_build/main-dev, _build/test, _build/app-test, plus
mode-suffixed assets/chunks). This does not isolate Meteor caches, local Mongo,
or ports. For separate local state or two instances of the same mode, use
distinct ports and METEOR_LOCAL_DIR values; older integrations also need this
for cross-mode output isolation:
PORT=3000 METEOR_LOCAL_DIR=.meteor/local-1 meteor run
PORT=3001 METEOR_LOCAL_DIR=.meteor/local-2 meteor runAnti-patterns
- Enable optimizations and Rspack at the same time on a legacy app. Enable
"modern": truefirst, clean up Babel fallbacks, then add Rspack. - Edit files inside
_build/,public/build-assets/,public/build-chunks/, orprivate/build-assets/. Autogenerated. - Assume
.gitignoreprevents code-quality tools from scanning generated Rspack output. Configure each tool's own ignore mechanism. - Copy
.gitignoreto.meteorignore. Git may ignore Rspack's generated handoff even though Meteor must read it. - Remove a custom Atmosphere minifier only because Rspack is enabled. Benchmark the final production bundle first.
- Disable Rspack persistent cache without need. It is the default and the main rebuild-speed win. Disable only when investigating OOM or a cache-related Rspack bug.
- Name an SWC config
config.swcrcorrc.swc. Only.swcrcis read.
See also
references/meteor-bundler-optimizations.mdreferences/rspack-config.mdreferences/eval-cases.md- For converting an existing app to Rspack:
migrate-to-rspackskill.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

