config.json. Add it, run 86d generate, and its components are usable in MDX with no imports to write.
Find one
Browse the Module catalog here, search npm, or ask the CLI:@86d-store/<name>, for example @86d-store/reviews. Any npm package or GitHub repository that satisfies the Module contract also works.
Add one with the CLI
86d module add downloads the Module, pulls in what it requires, runs bun install, and enables it in the active Template.
1
Add it
reviews), a scoped name (@86d-store/reviews), a GitHub specifier (github:owner/repo/modules/loyalty), or an npm specifier (npm:@acme/commerce-module). The full grammar is at 86d module add.2
Regenerate
3
Use its components
They are registered now. Put them anywhere in your MDX:
products/[slug]/layout.mdx
Add one by hand
Editingconfig.json directly does the same thing. Use this when you want the change to go through code review, or when a script is doing it.
1
Edit config.json
Append the package name to the
modules array in your active Template:templates/<theme>/config.json
2
Install it, if it is not already here
Workspace Modules under
modules/ are already on disk. A published npm package that is not needs installing:3
Regenerate
modules.ts.Pass a Module its options
Most Modules accept options. They go undermoduleOptions, keyed by exact package name:
External Modules
The generator loads an external npm package that exports a compatible default 86d Module factory. An ordinary React or MDX component package does not satisfy that contract and will not work.86d generate separates workspace packages from external npm packages, installs the external dependency, and calls its default export as a Module factory.
Take one back off
1
Disable it
config.json. If the file used "modules": "*", the CLI converts it to an explicit list with reviews left out.2
Regenerate
modules.ts, the API router, and the MDX component registry.3
Uninstall, if you want to
Leave a workspace Module in
modules/ and you can re-enable it later. An npm package you are done with can go: