Skip to content

[Blazor] Javascript bundler friendly #62417

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

Merged
merged 5 commits into from
Jun 20, 2025
Merged

Conversation

maraf
Copy link
Member

@maraf maraf commented Jun 19, 2025

  • When the application is not using loadBootResource callback and we are importing dotnet.js from default location, instead of using variable + absolute URI, use string literal with relative path, so path babel (or others) understands they can work with the import
  • Prepare for bundler-friendly JS initializers. Instead of using simple dictionary, expect array of objects, possibly containing moduleExports as resolved exports from JS initializer. This way babel can replace dynamic import with statically linked file.

@maraf maraf self-assigned this Jun 19, 2025
@maraf maraf added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Jun 19, 2025
@maraf maraf marked this pull request as ready for review June 19, 2025 20:04
@maraf maraf requested a review from a team as a code owner June 19, 2025 20:04
@maraf maraf added this to the 10.0-preview7 milestone Jun 20, 2025
@maraf
Copy link
Member Author

maraf commented Jun 20, 2025

/ba-g Failures are not related

@maraf maraf merged commit 1f5e355 into dotnet:main Jun 20, 2025
25 of 27 checks passed
@maraf
Copy link
Member Author

maraf commented Jun 20, 2025

/backport to release/10.0-preview6

Copy link
Contributor

@maraf maraf deleted the BlazorNewJsInitializers branch June 23, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants