Esbuild plugin kontra
Esbuild plugin for Kontra.js to remove unused code from Classes
Installation
npm install --save-dev esbuild-plugin-kontra
Usage
// rollup.config.js
const esbuild = require('esbuild');
const kontra = require('esbuild-plugin-kontra');
esbuild
.build({
entryPoints: ['index.js'],
bundle: true,
outdir: 'build',
plugins: [
kontra({
gameObject: {
// enable only velocity and rotation functionality
velocity: true,
rotation: true
},
vector: {
// enable vector length functionality
length: true
},
// turn on debugging
debug: true
})
]
});
Options
See Kontra.js docs for a list of available options. All options default to false
.