Is it possible to create an npm package that utilizes a SharedArrayBuffer? I created a basic npm package locally that uses SharedArrayBuffer. Locally, the app runs as intended without any errors. However, once I publish it to npm and try to use it from unpkg.com CDN, I get "SharedArrayBuffer isn't defined." Can someone explain what is happening at this stage?
I tried to enable SharedArrayBuffer directly in Chrome by enabling it using these steps:
- Navigate to chrome://flags/.
- Click "I accept the risk".
- search for "shared".
- select "Enabled" for the option "Experimental enabled SharedArrayBuffer support in JavaScript".
- click "relaunch now".
However, that didn't work. Is there any way I can configure my NPM package to tell Chrome to allow the usage of SharedArrayBuffer?