-
Install .NET 8 SDK
-
Install the
wasm-tools
andwasm-experimental
workloads by runningdotnet workload install wasm-tools
dotnet workload install wasm-experimental
-
Publish the wasm binaries to
bin/Release/net8.0/browser-wasm/AppBundle
directory by runningdotnet publish -c Release
-
The above will also automatically copy the generated
AppBundle
tocompressy-frontend/public/vendor
directory, so it can dynamically be imported. -
Change your working directory to
compressy-frontend
and installnpm
dependenciescd compressy-frontend npm install
-
Now we can either directly run the dev server
npm run dev
-
Or we can build the frontend code and use any static file server from the dist directory:
npm run build dotnet tool install dotnet-serve dotnet serve --mime .wasm=application/wasm --mime .js=text/javascript --mime .json=application/json --directory dist