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

added support for SharedArrayBuffers #9410

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

dioptre
Copy link

@dioptre dioptre commented Nov 27, 2023

↪️ Pull Request

Adding required headers to use SharedArrayBuffers in parcel serve

💻 Examples

https://stackoverflow.com/questions/70535752/enable-sharedarraybuffer-on-localhost

🚨 Test instructions

const shared = new SharedArrayBuffer(1024);

@mischnic
Copy link
Member

mischnic commented Nov 28, 2023

We already tried this before: #6404 and then reverted again in #6789 because many more people rely on some third party code/asset than on SAB: #6561

parcel-bundler/website#884

@lettertwo
Copy link
Member

Maybe there's a path forward here along the lines of this comment from @Banou26 #6561 (comment)

One thing you could do if you want to make it a default behavior is detect the use of those features in the code and then apply the COOP/COEP headers just like Parcel already does with service workers or webworkers's usage of their register function serviceWorkerContainer.register.
If we use SharedArrayBuffer or performance., then apply the COOP/COEP headers, otherwise, don't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants