Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maraf/dotnet-wasm-rename-icu

Change extension of ICU files in .NET on WASM app
https://github.com/maraf/dotnet-wasm-rename-icu

Last synced: 4 days ago
JSON representation

Change extension of ICU files in .NET on WASM app

Awesome Lists containing this project

README

        

# dotnet-wasm-rename-icu

Change extension of ICU files in .NET on WASM app

## Live demo

## Building source code

- Install .NET 8 SDK (RC1)
- Install wasm-tools workload `dotnet workload install wasm-tools`
- Run the project `dotnet run`

## Keep eye on

The solution consists of two parts

### MSBuild

```xml


...


.icu

...








```

### Javascript

```js
... = await dotnet
// 👇 Override resource URL resolution
.withResourceLoader((type, name, defaultUri, integrity) => {
// 👇 Override extension of ICU files
if (type == 'globalization') {
defaultUri = defaultUri.replace('.dat', '.icu');
}

return defaultUri;
})
.create();
```