-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packaging a client-side Blazor project into a single JS file #37732
Comments
@anthony-c-martin thanks for contacting us. As part of 6.0 we are shipping the ability to completely customize Blazor deployments. It's very likely you can leverage that to create a single JS file with all the necessary info. You can read more details about it here If you have more questions feel free to reach out. |
Very cool, thank you for sharing! I'll give that sample a go. |
Are there already exist the way to setup and write blazor and C# in |
Hi. It looks like you are posting on a closed issue! We're very likely to lose track of your bug/feedback/question unless you:
|
Afaik, there is none and it's not even planned: #37910 (comment) The PR that resolves one of the blocking issues has been moved to 7.0 milestone: dotnet/runtime#54640 I have the same needs and am currently experimenting with 6.0 branch trying to compile WASM runtime as a single-file js UMD library, which can be used in vscode. Will notify here if it'll get me anywhere. |
Thank you very much for your infos. I would hope this would possible soon |
As promised, here is the solution: https://github.com/Elringus/DotNetJS It allows compiling a C# project into single-file UMD library, which can be consumed in any JavaScript environment, including VS Code's web extensions. Here is a sample extension, that works both in desktop and web versions of VS Code: https://github.com/Elringus/DotNetJS/tree/main/Examples/WebExtension |
Is your feature request related to a problem? Please describe.
My team owns a VSCode extension, which interacts with a Language Server written in C# (https://github.com/Azure/bicep) to provide interactive language features. We have a demo playground, which leverages Blazor to host the C# code in-browser.
With the recently-announced VSCode.dev project, our extension is currently unsupported as it requires dotnet runtime to run the language server. It would be amazing if we could bundle our full language server and run it in-browser for the web version of VSCode. As far as I can tell, the main blocker here would be the requirement to bundle all extension JS into a single file.
Is anyone aware of a way of either generating a single JS file at publish time (including all DLLs, plus necessary framework dependencies), or utilizing a tool like webpack to package the full Blazor output into a single JS file?
Describe the solution you'd like
A mechanism to bundle client-side Blazor code into a single JS file.
The text was updated successfully, but these errors were encountered: