Main.js Introduction

Main.js is the core entry point for any expansion. It has exclusive access to the internal API features provided by Nexo Maker, making it the central file where your expansion's behavior is defined.

This file is critical because it determines:

  • Which components, modules, or features are registered.

  • What information or functionality is sent to Nexo Maker.

Key Points

  • Only Main.js can interact fully with the internal API (Modular.js has partial access), ensuring secure and consistent integration.

  • All registrations (e.g., buttons, routes, overlays, ...) must be defined here.

Best Practices

  • Keep Main.js organized and clearly document each registration.

  • Ensure that all changes in Main.js are tested within Nexo Maker before publishing the expansion.

Last updated