This is a boilerplate/template for Melvor Idle mods. Using Webpack, this will compile your mod to a single, uglified script file, largely reducing mod size and improving compatibilty with IDE features. The downside to this is it makes debugging in the browser a bit more difficult with the uglified source.
Requires Node.js
- Fork and clone repository.
- Run
npm install
- Update
package.json
'sname
property to match your mod. - Update
manifest.json
'snamespace
property. - Run
npm run build
to build. - Upload the generated
.zip
file in thedist
folder to mod.io.
- Don't use
loadModule
to import modules. Use ES6import
instead. - Image files that you want to bundle with your mod must be in the
img
folder and be imported somewhere in the code. - The
img
folder cannot have subdirectories. - As mentioned above, the minification and uglification of code makes debugging error messages a bit more tedious.