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

Replace worker-loader #10687

Closed
swissspidy opened this issue Feb 23, 2022 · 2 comments
Closed

Replace worker-loader #10687

swissspidy opened this issue Feb 23, 2022 · 2 comments
Labels
P3 Nice to have Type: Infrastructure Changes impacting testing infrastructure or build tooling

Comments

@swissspidy
Copy link
Collaborator

Task Description

This is a follow-up to #6304

In #5792 we experimented with replacing the now deprecated worker-loader with the new recommended approach in webpack v5.

We need to have an inline worker though, so we looked at using it in combination with asset/inline but without much luck.

Needs some tinkering on how to make it work, as there doesn't seem to be any documentation about it. Not to mention that any change must not our Rollup builds either.

Related: #10133

@swissspidy swissspidy added Type: Infrastructure Changes impacting testing infrastructure or build tooling P3 Nice to have Pod: WP & Infra labels Feb 23, 2022
@samwhale
Copy link
Contributor

Some more context for the future:

Was able to get it working by loading from a cdn here. However, getting the blurhash package to be loaded inline would be ideal. Was unable to figure out how to do that, so we went back to using the deprecated worker-loader.

Some possibly helpful threads I came across when implementing:


Another idea I tried that didn't end up working: move the worker script to its own package, build that with webpack and inline blurhash, then load that in to the main app. The branch where I was testing has some commits that may be helpful:

@swissspidy
Copy link
Collaborator Author

Related: rollup-plugin-web-worker-loader would need an update/replacement too

@swissspidy swissspidy removed the Pod: WP label Feb 2, 2023
@swissspidy swissspidy closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Nice to have Type: Infrastructure Changes impacting testing infrastructure or build tooling
Projects
None yet
Development

No branches or pull requests

2 participants