Project Configuration
The configuration options for a Jaspr project.
Each Jaspr project is a normal Dart project including a pubspec.yaml file and lib/ directory.
The project-wide Jaspr configuration is specified in pubspec.yaml under the jaspr option:
name: my_project
...
jaspr:
mode: server
port: 8080
flutter: plugins
styles: standalone
There are currently the following configuration options available:
modeEnumrequiredSets the Rendering Mode for your project. Either static, server or client.
portintoptionalOnly applicable in "static" or "server" mode.
Specifies the target port to use when serving your project. This is optional and defaults to "8080" if not set. Can be overridden by the --port flag with jaspr serve.
flutterEnumoptionalSpecifies the Flutter support for your project.
embedded: Enables Flutter embedding support, allowing you to use Flutter widgets inside Jaspr components.plugins: Enables Flutter plugin support, allowing you to use Flutter plugins that provide web support inside your project.noneor omitted: No Flutter support.
Using either embedded or plugins requires the Flutter SDK to be installed and available in your system PATH, as well as a dependency on build_web_compilers with a minimum version constraint of 4.4.6 or higher.
stylesEnumoptionalSpecifies how styles defined with @css are generated:
inline: Styles are inlined into the pre-rendered HTML (Not supported inclientmode).standalone: Styles are generated as a standalone CSS file.
It is optional and defaults to inline for static and server mode and standalone for client mode.
When using standalone, all libraries containing @css definitions are executed during the build process using the Dart VM. Importing web-only libraries like dart:js_interop or package:web will lead to build errors. See Using Platform Libraries for ways to avoid this.

