1
Get a key
Every expansion is verified when it loads. Create a secret for the id you are going to use, for example
https://lodemc.net/devs/dashboard/secretsThe id and the key belong together: a key issued for one id will not load an expansion using a different one. See Publishing for what happens before your expansion is published.
my_expansion. You will paste it into meta.json as apiKey.https://lodemc.net/devs/dashboard/secretsThe id and the key belong together: a key issued for one id will not load an expansion using a different one. See Publishing for what happens before your expansion is published.
2
Create the folder
Make a folder for your expansion inside your Expansions folder, under any name you like:The folder name does not matter.
- Windows
- macOS
- Linux
meta.json’s id is what identifies your expansion.3
Add meta.json and config.json
meta.json says who your expansion is, and config.json names the file that runs first.apiKey. id is lowercase letters, digits and _, and must be the id the key was created for. Full rules in the manifest guide.4
Add the code
The start file registers a page and a sidebar button. The page is an ordinary React component.
tsconfig.json is only for your editor; the app does not need it. Prefer JavaScript? Name the files .js and .jsx, point start at src/index.js, and leave out tsconfig.json.5
Open the app
The app picks the folder up without a restart. Open Project Settings → Expansions and you should see your expansion listed.
- If it declares permissions, it waits at Needs approval until you press Review permissions.
- Before it is published on NMCrate it loads marked Untrusted, which is normal during development.
- If something is wrong, the card says what, and the logs button shows the expansion’s own log.
6
Edit and watch it reload
Save any file in the folder. The app rebuilds and swaps the expansion in place: no restart, no reopening the project. What changed is re-run, the rest keeps its state. See Lifecycle.
7
Editor setup
Nothing to install. When the app loads your folder it writes:The
tsconfig.json above already points at them. They come from the app that runs your code, so they can never be out of date. Delete them and they come back on the next load.For real React typing (correct DOM props, proper JSX), run npm i -D @types/react in your expansion folder. The app then stops writing the shim and leaves your types alone. node_modules is only ever your editor’s: it is never bundled into your expansion, and it is left out of a packed .lde.8
Build it
When you want a package to share or upload, open the app’s console with the CLI button in the footer, and name your expansion by its id:That writes
Expansions/Exports/<folder>.lde. See Publishing for the flags, including --open-source.Next
Modules and imports
How files, CSS and assets come together
sdk reference
Everything you can add to the app
Examples
Working expansions to read