-
Notifications
You must be signed in to change notification settings - Fork 260
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
Set an environment variable with the JS file that needs to be loaded for workers #604
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Can this be reopened? |
I've started to take a look at this. Here's a thing:
This would mean two things: a) it cannot be processes in parallel (which it might likely can't anyway because of cargo build locks) and b) there must be an order of imports (worker first, then main), which might get tricky and problematic if there's a circular dependency situation (not sure that worth supporting). We would resolve this by having fixed shim names, and then fetching with That would of course mean that shim loaders would because a requirement for solving #405. |
Trunk supports web workers as assets and can generate a loader shim:
When using these workers, it is mandatory to know the path. For example, with
gloo-worker
:This can be solved by trunk if an environment variable is set which names the loader file. That would make the loading:
The name of the environment variable will be inferred by the asset configuration. It will also be possible to override the environment variable name
The text was updated successfully, but these errors were encountered: