Getting started with WebApps
Since 9.0 Sitevision WebApps enables developers to use Sitevision APIs in combination with popular UI libraries (such as React) - all bundled together with webpack.
Create Sitevision App
To quickly get started with bundled apps in Sitevision we recommend using the Create Sitevision App project. Bundled WebApps created from Create Sitevision App will generate a boilerplate app based on React with two dependencies:
- @sitevision/sitevision-script - provides deployment scripts and Sitevision optimized webpack build configuration. This means you can focus entirely on your code rather than tedious build configuration.
- @sitevision/api - provides TypeScript definitions for Sitevision's Public API, which means you will get IntelliSense support when working with Sitevision's Public API.
Please refer to the Create Sitevision App Readme on how to get started using the tool.
The anatomy of a WebApp
A WebApp consists of up to three entry points and other static resources.
- index.js *mandatory
- Entry point for server side bundle
- main.js *mandatory
- Entry point for client side bundle
- Entry point for pre render hooks bundle (server side)
- manifest.json *mandatory
- Contains metadata for a WebApp, such as version and id
- i18n bundles using a JSON format
- Put user configuration files here
- Only used during development for easy deployment
- Default values for WebApp configuration
- Folder for resources to enable some convenience methods
Many utilites and APIs are available when working with WebApps. Check out the SDK documentation.