You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With NextJS 14 importing web worker is causing an error and won't load it. At version 8.3.13 it works, before @module-federation runtime refactored. I manage to create a basic reproduction for you. Be careful dont use dev server. Build it and start.
Code from remote/index.ts can't use isBrowserEnv function after 8.3.14 version after runtime core is refactored to runtime/index.ts.
Describe the bug
With NextJS 14 importing web worker is causing an error and won't load it. At version 8.3.13 it works, before @module-federation runtime refactored. I manage to create a basic reproduction for you. Be careful dont use dev server. Build it and start.
Code from remote/index.ts can't use isBrowserEnv function after 8.3.14 version after runtime core is refactored to runtime/index.ts.
Code is crashing at line
core/packages/runtime/src/remote/index.ts
Line 393 in 46978c1
Possible fix: isBrowserEnv function can be used from util folder https://github.com/module-federation/core/blob/main/packages/runtime/src/utils/env.ts without having to be imported from sdk
Reproduction
https://github.com/gokalpfirat/nextjs-mf-example-v2
Not dev server, npm run build && npm run start
Used Package Manager
npm
System Info
System: OS: macOS 14.2.1 CPU: (12) arm64 Apple M3 Pro Memory: 185.97 MB / 36.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 20.10.0 - /usr/local/bin/node Yarn: 1.22.21 - /usr/local/bin/yarn npm: 10.2.3 - /usr/local/bin/npm pnpm: 9.5.0 - ~/Library/pnpm/pnpm Browsers: Chrome: 127.0.6533.100 Safari: 17.2.1
Validations
The text was updated successfully, but these errors were encountered: