Package types
Modular can build several different kinds of packages. We refer to each package type as a Modular type, and each has different features. The table below summarises the compatibility of each Modular type with Modular commands and details their unique features.
Type | start | build | test | lint | Custom index / assets | Bundled | Entry-point |
---|---|---|---|---|---|---|---|
app | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | src/index.tsx |
esm-view | ✅ | ✅ | ✅ | ✅ | ✅ | ✅† | src/index.tsx |
package | ❌ | ✅ | ✅ | ✅ | N/A | ❌ | main field of package.json |
view | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | main field of package.json |
source | ❌ | ❌ | ✅ | ✅ | N/A | N/A - never built | N/A - never built |
template | ❌ | ❌ | ✅ | ✅ | Depends on the target type | N/A - never built | N/A - never built |
† For ESM Views, external dependencies are rewritten to point to a CDN