Skip to content
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

[browser] Allow JS modules to be injected as pre-loaded assets #90392

Merged
merged 3 commits into from
Aug 11, 2023

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Aug 11, 2023

  • new asset.moduleExports field which could be pre-populated with ES6 exports of runtime modules
  • demo in browser-minimal-config\main.js
  • allow promise in asset.buffer

To address user feedback
Fixes #89510

@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm labels Aug 11, 2023
@pavelsavara pavelsavara added this to the 8.0.0 milestone Aug 11, 2023
@pavelsavara pavelsavara requested a review from maraf August 11, 2023 13:17
@pavelsavara pavelsavara self-assigned this Aug 11, 2023
@ghost
Copy link

ghost commented Aug 11, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details
  • new asset.moduleExports field which could be pre-populated with ES6 exports of runtime modules
  • demo in browser-minimal-config\main.js
  • allow promise in asset.buffer

To address user feedback
Fixes #89510

Author: pavelsavara
Assignees: pavelsavara
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript, os-browser

Milestone: 8.0.0

@pavelsavara
Copy link
Member Author

cc @elringus

@elringus
Copy link

This should work. Thank you!

@pavelsavara pavelsavara marked this pull request as ready for review August 11, 2023 14:36
Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
@pavelsavara
Copy link
Member Author

@elringus you could take the sample and webpack/rollup it. You could also possibly import json from "./_framework/blazor.boot.json" we generate from that main.js via some webpack json plugin.

@pavelsavara pavelsavara merged commit 34b6db9 into dotnet:main Aug 11, 2023
33 checks passed
@ghost ghost locked as resolved and limited conversation to collaborators Sep 10, 2023
@pavelsavara pavelsavara deleted the browser_provided_modules branch September 2, 2024 15:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[browser] single file JavaScript and custom loader
3 participants