Skip to content

Installing npm plugins โ€‹

Some plugins are shipped as npm packages instead of living as folders under your app plugins/ directory. The flow is intentionally small today: install the package, then declare the plugin in your raclette app config. A first-class plugin store in the product is planned for the future; until then, treat this as โ€œadd a dependency + list it.โ€

1. Add the dependency โ€‹

Use your package manager as usual, for example:

bash
yarn add @your-scope/your-raclette-plugin

Use the exact package name and version range your team or the plugin author documents.

2. Register the plugin in config โ€‹

List the plugin in your raclette.config so the runtime loads it alongside local plugins/* folders. The list is typically a top-level plugins array (plugin keys / package names as your template documents โ€” match what create-raclette-app generated for your app).

Example shape (YAML style as in many scaffolds):

yaml
# โ€ฆ
plugins:
  - "@your-scope/your-raclette-plugin"

If your project uses raclette.config.js / .ts, the same idea applies: ensure the plugins field includes the installed package identifier the loader expects.

TIP

Your scaffoldโ€™s raclette.config is the source of truth for key format. When in doubt, compare with a fresh create-raclette-app project or the raclette config reference.

3. Run and verify โ€‹

Start the app (yarn dev or your usual command). The plugin should appear with the same capabilities as a local plugin (routes, widgets, etc., depending on what the package ships).

Local development vs npm โ€‹

  • Local folder under plugins/ โ€” fastest for your business logic; see Getting started with plugins.
  • npm package โ€” for shared or versioned plugins you install like any other dependency.

See also โ€‹