-
Notifications
You must be signed in to change notification settings - Fork 10k
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
An option to publish Blazor WASM as UMD library #37910
Comments
@elringus thanks for contacting us. It's unclear to us what you are asking here. What do you propose Blazor does instead of accessing the window or using things like document.createElement? |
Hi @elringus. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@javiercn The bare minimum required for interop. I guess that will be invoking |
@elringus Thanks for the additional details. Unfortunately, that's not something we plan to work on in the near future. Our focus is to deliver a UI experience using C# and web technologies and we don't plan to offer an out of the box experience that doesn't involve UI. This is something you'll have to create yourself by bootstrapping the Webassembly runtime in the same way we do, or the UNO platform does. It's not something that we from the ASP.NET team plan to work on. |
This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes. See our Issue Management Policies for more information. |
In case someone finds this looking for a similar use case, I've a made a solution, that compiles C# project into a single-file UMD library: https://github.com/Elringus/DotNetJS |
Is your feature request related to a problem? Please describe.
I'm looking to compile C# to an environment-agnostic (UMD) JavaScript library to be used in both browser and server environments.
blazor.webassembly.js
bundled with Blazor WASM distro is not UMD-compliant, as it attempts to accesswindow
and manipulate the DOM (eg, via document.createElement calls).Describe the solution you'd like
A deploy/build option for Blazor WASM projects to produce a single file UMD-compliant JS library.
Additional context
Example use case: using C# libraries from VS Code web extension.
Similar issue: #37732 (the proposed solution to customize Blazor deployments won't work, as the issue is with the
blazor.webassembly.js
)The text was updated successfully, but these errors were encountered: