✨ Bundler plugin system
Description
Right now FeniXCLI is not meant for programmatic usage as there is no public API available. this is okay but rather than provide the bundler I believe it should be as a separate package(plugin) that can be installed by the base FeniXCLI tool.
Why is this change important
- Gives the ability to use a different bundler
- Opens the API to the public to create their own bundler plugins
- More customization's and options depending on plugin used
- A more lightweight CLI tool that brings in only plugins required by developer
- Installing the plugins using the CLI itself will still keep configuration minimal
Possible Implementation
import builder from 'fenix-engine-cli'
import RollupPlugin from 'fenix-cli-plugin-rollup'
await builder({
target: `./src/`,
destination: './game/js/plugins/'
sourcemap: true,
bundler: RollupPlugin()
})
Does it introduce breaking changes
It's possible and could require a major change to the builder module, but I also believe it's possible to introduce this feature with minimal changes to the API if designed right.
Edited by ltngames