Documentation Index
Fetch the complete documentation index at: https://mintlify.com/meteor/meteor/llms.txt
Use this file to discover all available pages before exploring further.
Isobuild System
Meteor’s packaging system is called Isobuild. It compiles the same JavaScript code-base to different architectures: browser, Node.js-like server environments, or WebView in Cordova mobile apps.Core Concepts
What is Isobuild?
Isobuild is Meteor’s build and packaging system that knows how to compile code for multiple target architectures from a single source tree. The name comes from “isomorphic build” - the ability to build the same code for different execution environments. From the source code (GLOSSARY.md):Meteor has a packaging system called “Isobuild”. Isobuild knows how to compile the same JavaScript code-base to different architectures: browser, node.js-like server environment (could be Rhino or other) or a webview in a Cordova mobile app.
Architecture Targeting
Isobuild supports multiple target architectures:web- Base web architectureweb.browser- Modern browsersweb.browser.legacy- Legacy browser supportweb.cordova- Cordova mobile appsos- Generic Node.js serveros.linux.x86_64- Platform-specific server buildsos.osx.x86_64- macOS specific builds
Architecture Matching
The system uses sophisticated architecture matching to find the most appropriate build for a given target:Build Modes
Isobuild supports different build modes that affect which packages are included:- production - Default mode, excludes debugOnly packages
- development - Includes debugOnly packages
- test - Includes testOnly packages for testing
Package Loading Order
Isobuild performs a two-phase topological sort to determine package load order:Phase 1: Determine Used Packages
Identify all packages (unibuilds) that will be used, following non-weak dependencies.Phase 2: Determine Load Order
Establish the correct loading sequence where dependencies appear before dependents:Isopackets
Isopackets are predefined sets of isopacks used inside the meteor-tool itself: From GLOSSARY.md:An isopacket is a predefined set of isopackages which the meteor command-line tool can load into its process. This is how we use the DDP client and many other packages inside the tool.
Platform Specificity
Packages can be platform-specific if they contain binary builds:Isobuild Features
Packages can declare dependencies on isobuild features using theisobuild:* pseudo-packages. These ensure the build system has certain capabilities available.
Watch Sets
Isobuild maintains WatchSets to track file dependencies:Source Root Detection
For packages built from source, Isobuild can determine the original source root:Build Profiles
ThebuildArchitectures() method can return simplified or complete architecture lists:
Key Files
tools/isobuild/isopack.js- Core Isopack implementationtools/isobuild/bundler.js- Build orchestrationtools/isobuild/compiler.js- Compilation logictools/utils/archinfo.js- Architecture detection and matching
Related Topics
- Isopacks - The package format
- Bundler - Bundle generation
- Compiler Plugins - Extending the build system