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: 2 months ago
JSON representation
Change extension of ICU files in .NET on WASM app
- Host: GitHub
- URL: https://github.com/maraf/dotnet-wasm-rename-icu
- Owner: maraf
- License: apache-2.0
- Created: 2023-07-19T07:30:10.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-03T07:39:35.000Z (almost 3 years ago)
- Last Synced: 2025-01-17T01:38:30.632Z (over 1 year ago)
- Language: JavaScript
- Size: 2.39 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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();
```