-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Audio Worklet Support (11.1, Webpack 5) #29472
Comments
|
@alexander-akait This is exactly what we are doing. And this issue occurs only in production build, because it tries to split everything that was imported inside the worklet processor file into chunks, and then runs |
Please take a look at this issue outlining a more detailed scope here: #24907 We've tried using the parser config as well as the plugin made by someone at the end of the thread. Everything compiles and runs fine, until the Worklet Processor is loaded by Audio Context. Then it crashes with the |
Please verify that your issue can be recreated with Why was this issue marked with the
|
This issue has been automatically closed because it wasn't verified against next@canary. If you think it was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you. |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
11.1.2
What version of Node.js are you using?
16.9.1
What browser are you using?
Latest Chrome and Safari (14.5)
What operating system are you using?
Windows 10, and macOS Big Sur
How are you deploying your application?
next start
Describe the Bug
Our application is built on top of Next. We recently upgraded from Next 10 to Next 11, which involved a necessary upgrade from Webpack 4 to Webpack 5.
We have been unable to get audio worklets fully working after the upgrade.
We are using the following plugin for worklets:
https://github.com/popelenkow/worker-url
We can get the worklets working in dev mode, however when trying to use them in production, we are greeted with the following error:
ReferenceError: importScripts is not defined
In dev mode, the bundle for the worklet contains all of its imports, but in prod, it is split into chunks and
importScripts
seems to be injected, which doesn't work in the worklet scope.For more information, please also see this previous issue that deals with Webpack importing scripts from chunks:
#24907
Expected Behavior
Load the worklet processor chunk properly without being impeded by
importScripts
To Reproduce
Install the following package:
npm i --save-dev worker-url
Import plugin from package, push new plugin to next.config plugin list.
Build and run app in production mode.
Initiate audio recording using audio worklet.
The text was updated successfully, but these errors were encountered: