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 needsBlazor's scripts need
Safari1516.4
iOS1516.4
Android WebView8494

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
2. Load its script from _framework/ instead of Blazor's own:
  • bit.blazor.web.es2019.js instead of blazor.web.js
  • bit.blazor.webassembly.es2019.js instead of blazor.webassembly.js
  • bit.blazor.server.es2019.js instead of blazor.server.js
  • bit.blazor.webview.es2019.js instead of blazor.webview.js
<script src="_framework/bit.blazor.web.es2019.js"></script>
3. For Blazor WebAssembly on those older browsers, also turn off WebAssembly SIMD in the client project:
<PropertyGroup>
    <WasmEnableSIMD>false</WasmEnableSIMD>
</PropertyGroup>
Older devices across bit
bit Boilerplate loads these scripts out of the box, and the JavaScript that bit BlazorUI, Bswup, Butil and the utilities ship is built for ES2019 as well, so an app made with bit reaches the same devices from end to end. The script that builds them is in the bit BlazorES2019's README.