This is an example add-on that I put together for EEConf 2022. You can view the slides of my talk here: https://docs.google.com/presentation/d/1bmyx4vKHIAoaojJXVIMvXI1MmYy_6BkmorWoyFZQinw/edit?usp=sharing
You can use this builder in your local site built with docker, or on a remote server. You need to have npm installed.
mkdir add-on-builderin the root directory if not exist.cd add-on-builderandgit clonethis project
In your directory,
npm install
to install all the packages.
npm copy
to copy the files to the system/user/addons and themes/user. If you've modified the locations of your add-ons folder and/or themes folder, place adjust the paths in config/paths.js.
When you are ready to start working on the React app,
npm run watch
and start working in the src directory and system/user/addons/react_project files.
You need to change react_project to your own add-on's path in config/paths.js.
npm run build
Distribute the dist/ files.