meta.json is who it is, config.json is how to run it. Neither contains code, and both are read before anything of yours runs.
Every problem in them is reported at once, naming the file and the field, so you fix the list rather than one error per reload:
meta.json
meta.json
Unknown keys are kept out of the way with a warning rather than failing the load.
type
New in 2.2."type" says what kind of expansion this is:
Any other value is an error.
"type": "library" is reserved, and refused with libraries ("type": "library") are not supported yet.
id and version, in practice
- The
idappears in the routes of your pages (custom/my_expansion.home) and prefixes everything you register, so two expansions can both have ahomepage. - Changing
idafter release means NMCrate sees a different expansion, and per-project state saved under the old id is no longer read. versionis what the store shows, what an update compares against, and what other expansions’requiresranges are checked against.
requires
New in 2.1. Name the expansions yours needs, with the version range it works with:meta.json
config.json
config.json
A missing
config.json is accepted with a warning and the defaults.
Errors for background:
settings, locales, build, main. (background was reserved in 2.0 and is real since 2.1.)
Compatibility
sdkVersion is checked against the SDK the app provides, 2.4.0:
- satisfied: loads normally
- not satisfied: does not load, and the Expansions page says
^2.0.0 keeps working. Declare the lowest version that has what you use: ^2.1.0 for most points, ^2.2.0 for apps, ^2.3.0 for tools, ^2.4.0 for project types.
Prereleases only match a range that mentions one, as in npm.