ZELTUXDocs Get ZELTUX

🧠 Module Installation

#Module Instalation

Only install a package if it’s truly necessary for your addon to work. Avoid adding dependencies unless there’s no reasonable alternative. We recommend using lightweight libraries whenever possible,

Before using require(), you can automatically install needed packages with utility.installModule() - this prevents errors if the module isn’t already installed.

Description: utility.installModule() checks whether a module is installed, and if not, installs it automatically using npm. This is useful for addons that rely on external libraries, so users don’t have to manually run npm install.

#EXAMPLE

js
utility.installModule(['axios']);
const axios = require('axios');