👋🏻 Hey there, we love this project and are using it for an internal documentation site.
We have somewhat of a special use case and I wanted to contribute this back just in case there's someone else who runs into this.
We are running a pnpm monorepo, with multiple applications, some on Webpack 4 and some on Webpack 5.
When using this plugin we were met with the following error:
Error: Child compilation failed:
NormalModuleFactory.beforeResolve (NormalModuleReplacementPlugin) is no longer a waterfall hook, but a bailing hook instead. Do not return the passed object, but modify it instead. Returning false will ignore the request and results in no module created.
The reason is - the docusaurus-theme-redoc components imports webpack but doesn't declare it in its peerDependencies.
Because of this pnpm does not know to give it 5, and as such it resolves to a random/most common version in our mono repo.
The quick workaround is to declare this in the root package.json:
👋🏻 Hey there, we love this project and are using it for an internal documentation site.
We have somewhat of a special use case and I wanted to contribute this back just in case there's someone else who runs into this.
We are running a
pnpm
monorepo, with multiple applications, some on Webpack 4 and some on Webpack 5.When using this plugin we were met with the following error:
The reason is - the
docusaurus-theme-redoc
components importswebpack
but doesn't declare it in itspeerDependencies
.Because of this
pnpm
does not know to give it5
, and as such it resolves to a random/most common version in our mono repo.The quick workaround is to declare this in the root package.json:
I'll raise this PR to fix this shortly! Thanks for the great project!