bit BlazorES2019
Blazor for the devices people really have
Not everyone has this year's phone. Many people keep a device for years, and many of those devices can't update their browser any more.
We care that apps built with bit work for them too, so bit BlazorES2019 brings Blazor back to the older iPhones, Macs and Android devices
that its own scripts leave behind.
dotnet add package Bit.BlazorES2019
The problem
.NET itself runs on Safari 15, Chrome and Edge 95, Firefox 100, iOS 15, macOS 12 and Android 8 with WebView 84. Blazor's own scripts,blazor.web.js, blazor.webassembly.js, blazor.server.js and blazor.webview.js,
are compiled for ES2022 and newer (ES2024 in .NET 10), which raises the bar:
| .NET needs | Blazor's scripts need | |
|---|---|---|
| Safari | 15 | 16.4 |
| iOS | 15 | 16.4 |
| Android WebView | 84 | 94 |
So an iPhone that stopped at iOS 15 shows a blank page, although .NET runs on it just fine.
The fix
bit BlazorES2019 is the same Blazor scripts, built from the source of the official ASP.NET Core repository with only the compile target changed to ES2019. Our release pipelines build them for every bit release, for .NET 9 and .NET 10, so nothing else about Blazor changes.How to use it
1. Install the package in the project that serves Blazor's script: the server project of a Blazor Web App, the project of a standalone Blazor WebAssembly app, or the MAUI project of a Blazor Hybrid app.dotnet add package Bit.BlazorES2019
_framework/ instead of Blazor's own:
bit.blazor.web.es2019.jsinstead ofblazor.web.jsbit.blazor.webassembly.es2019.jsinstead ofblazor.webassembly.jsbit.blazor.server.es2019.jsinstead ofblazor.server.jsbit.blazor.webview.es2019.jsinstead ofblazor.webview.js
<script src="_framework/bit.blazor.web.es2019.js"></script>
<PropertyGroup>
<WasmEnableSIMD>false</WasmEnableSIMD>
</PropertyGroup>