dotnet / dotnet/aspnetcore

Publish blazor.*.js files to npm

Open
#10,124 20 comments 21 reactions 0 assignees View on GitHub
affected-few area-blazor feature-blazor-jsinterop Pillar: Technical Debt Priority:2 severity-minor task
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

I'm working on implementing some server-side Blazor components, but I have a lot of other Javascript functionality on the page. I would like to be able to include the needed `blazor.server.js` file in my webpack build process, instead of having to embed it directly on the page. This way all of the Javascript for my application gets included in one file.

I would like to be able to bundle `blazor.server.js` into my webpack build, by either accessing it through NPM or being able to link to it directly. However, according to aspnet/AspNetCore.Docs#12358 this is an embedded resource in the middleware, so I'm not sure how I can access it and include it in my build.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.