feat: cross platform projects.

This commit is contained in:
Zhang Dian
2023-07-19 21:36:31 +08:00
parent 2fd02f264e
commit e20b1ebc22
39 changed files with 779 additions and 23 deletions

View File

@@ -0,0 +1,13 @@
import { dotnet } from './dotnet.js'
const is_browser = typeof window != "undefined";
if (!is_browser) throw new Error(`Expected to be running in a browser`);
const dotnetRuntime = await dotnet
.withDiagnosticTracing(false)
.withApplicationArgumentsFromQuery()
.create();
const config = dotnetRuntime.getConfig();
await dotnetRuntime.runMainAndExit(config.mainAssemblyName, [window.location.search]);