A React component that streamlines the development of frontend features for Ayon addons in React.
It simplifies basic styling and dependencies, establishes a connection to the parent app via a simple context manager, and allows for a stand-alone mode for use with a development server.
Use .env
file to provide necessary variables normally passed
to the addon using window.onmessage
:
Addon
SERVER_URL="http://localhost:5000"
VITE_ADDON_NAME="test"
VITE_ADDON_VERSION="0.0.1"
VITE_ADDON_SCOPE="project"
VITE_PROJECT_NAME="demo_Commercial"
When
- Addon itself should define, in which scope it can run.
- Project should be selectable from the standalone mode toolbar.
Addon frontend must use relative paths to its static dependencies.
In case of vite, add base: ''
to your vite.config.js
.