Deployment type


bit project templates support multiple deployment type for their web applications.

Supported deployment types are:

Spa (Default configuration)
It's referring to a Typical Single Page Application (SPA) without pre-rendering.
Note: We'd recommend using next options for production and use Spa only for development / debugging.
SpaPrerendered
Server-side rendering (SSR), is the ability of an application to contribute by displaying the web-page on the server instead of rendering it in the browser. Server-side sends a fully rendered page to the client; Blazor pre-renders page and sends it as a static page, then later the page becomes an interactive Blazor app. This behavior is intended to serve pages quickly to search engines with time-based positioning. Statically prerender the component along with a marker to indicate the component should later be rendered interactively by the Blazor app. It improve SEO.
It's referring to a Typical Spa with pre-rendering.
Demo: bitplatform.dev
In order to enable prerendering, simply set PrerenderEnabled in Core/Services/AppRenderMode.cs to true
public static readonly bool PrerenderEnabled = true;
Pwa
A Blazor WebAssembly app built as a Progressive Web App (PWA) uses modern browser APIs to enable many of the capabilities of a native client app, such as working offline, running in its own app window, launching from the host's operating system, receiving push notifications, and automatically updating in the background.
Demo: adminpanel.bitplatform.dev
In order to enable pwa, simply set PwaEnabled in Directory.Build.props to true
<PwaEnabled>true</PwaEnabled>
PwaPrerendered
Server-side rendering (SSR), is the ability of an application to contribute by displaying the web-page on the server instead of rendering it in the browser. Server-side sends a fully rendered page to the client; Blazor pre-renders page and sends it as a static page, then later the page becomes an interactive Blazor app. This behavior is intended to serve pages quickly to search engines with time-based positioning. Statically prerender the component along with a marker to indicate the component should later be rendered interactively by the Blazor app. It improve SEO.
It's referring to a Typical Pwa with pre-rendering.
Demo: todo.bitplatform.dev
In order to enable pwa pre-render, simply enable both pwa and pre-render.
PrerenderedOnly
Statically renders the component with the specified parameters. It's recommended when the target is building a static page like a landing page.
In order to enable pre-render only, simply remove @rendermode=renderMode from Server/Components/App.razor file.