Open MadaraUchiha-314 opened 4 days ago
When BFF server is booted up for the first time, there's a similar call to __webpack_require__
with the moduleId as ./src/app.tsx
and that doesn't fail.
Somewhere during revalidate(),
__webpack_modules__
is getting cleared and the next call fails.
The following entries seem to be removed from __webpack_modules__
after revalidate()
has been called:
'./src/app.tsx',
'../../node_modules/react/cjs/react.development.js',
'../../node_modules/react/index.js'
These correspond to the exposed module and './src/app.tsx'
and react
Snapshot of __webpack_modules__
before and after.
Before:
[
'../../node_modules/@module-federation/error-codes/dist/index.cjs.js',
'../../node_modules/@module-federation/runtime/dist/index.cjs.js',
'../../node_modules/@module-federation/runtime/dist/polyfills.cjs.js',
'../../node_modules/@module-federation/runtime/dist/share.cjs.js',
'../../node_modules/@module-federation/sdk/dist/index.cjs.js',
'../../node_modules/@module-federation/sdk/dist/polyfills.cjs.js',
'../../node_modules/@module-federation/webpack-bundler-runtime/dist/constant.cjs.js',
'../../node_modules/@module-federation/webpack-bundler-runtime/dist/index.cjs.js',
'../../node_modules/@module-federation/webpack-bundler-runtime/dist/polyfills.cjs.js',
'../../node_modules/webpack/hot/dev-server.js',
'../../node_modules/webpack/hot/emitter.js',
'../../node_modules/webpack/hot/log-apply-result.js',
'../../node_modules/webpack/hot/log.js',
'webpack/container/entry/shell_app',
'events',
'os',
'process',
'tty',
'../../node_modules/@module-federation/node/dist/src/runtimePlugin.js',
'../../node_modules/isomorphic-rslog/dist/node/index.cjs',
'./node_modules/.federation/entry.cb95599fec437b225c6731bbaa287f03.js',
'./src/app.tsx',
'../../node_modules/react/cjs/react.development.js',
'../../node_modules/react/index.js'
]
After:
[
'../../node_modules/@module-federation/error-codes/dist/index.cjs.js',
'../../node_modules/@module-federation/runtime/dist/index.cjs.js',
'../../node_modules/@module-federation/runtime/dist/polyfills.cjs.js',
'../../node_modules/@module-federation/runtime/dist/share.cjs.js',
'../../node_modules/@module-federation/sdk/dist/index.cjs.js',
'../../node_modules/@module-federation/sdk/dist/polyfills.cjs.js',
'../../node_modules/@module-federation/webpack-bundler-runtime/dist/constant.cjs.js',
'../../node_modules/@module-federation/webpack-bundler-runtime/dist/index.cjs.js',
'../../node_modules/@module-federation/webpack-bundler-runtime/dist/polyfills.cjs.js',
'../../node_modules/webpack/hot/dev-server.js',
'../../node_modules/webpack/hot/emitter.js',
'../../node_modules/webpack/hot/log-apply-result.js',
'../../node_modules/webpack/hot/log.js',
'webpack/container/entry/shell_app',
'events',
'os',
'process',
'tty',
'../../node_modules/@module-federation/node/dist/src/runtimePlugin.js',
'../../node_modules/isomorphic-rslog/dist/node/index.cjs',
'./node_modules/.federation/entry.cb95599fec437b225c6731bbaa287f03.js'
]
Manually checked the diff b/w the remote entries for shell
after multiple reloads. The only change is in the hash.
5502c5502
< /******/ __webpack_require__.h = () => ("114050193a9b2d6baa01")
---
> /******/ __webpack_require__.h = () => ("fd3d596472defec70cae")
Error:
The error comes from a call to
__webpack_require__
with themoduleId
as./src/app.tsx