GUIDE 19 / 28 · NATIVE 2.0.7

Packaging & compatibility

Ship a self-contained plugin directory, preserve user configuration and test the native runtime.

Release directory layout#

Package one directory containing plugin.json, the entry file, optional static assets and a README. The installed folder must be an immediate child of plugins. Exclude node_modules unless your bundle truly needs assets from it; the runtime has no require-based dependency resolution.

Release layout
my-plugin/
  plugin.json
  index.js
  README.md
  assets/
    optional-static-file.svg

Use a stable ID across updates so the plugin remains recognizable. Update the version string and describe tested native versions in your README, since the loader does not enforce a compatibility range.

Bundle dependencies and choose exports#

Third-party dependencies need to be included in a JavaScript bundle that fits the current sandbox. The result should assign module.exports, avoid unresolved require/import calls and use only available globals. Browser-only packages that expect window, document or DOM event APIs do not run in the backend VM.

Replacing Electron imports with guessed context methods is not a migration. Use the verified context API and move any unsupported behavior into a supported plugin action or a native application change.

Preserve settings during updates#

Stop plugin-related work before replacing files. Back up the plugin folder and merge configuration deliberately; distributing a default plugin.json over a configured manifest can erase counters or endpoint values. Keep a settingsVersion marker for migrations, and preserve the user's enabled state where your updater allows it.

Hot reload can evaluate several partial edits as you copy files. For manual installation, copy a complete folder then choose Reload Plugins. Avoid recurring timers that survive module replacement.

Release checks#

Check JSON parsing, module exports, native hooks, UI actions, persistent state, disabled behavior and empty-network-config behavior. Use a fresh native profile for repeatable tests. Remove local journals, personal config values, tokens and captured clips from the archive.

The documentation provides three complete sample directories in the example ZIP. These are local installation examples; downloading them does not automatically install them or add them to the community hub.

Implementation reference: src/main/plugins/PluginManager.ts · native 2.0.7.