-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Redoc does not work with nextjs #1647
Comments
I was just about to open exactly the same ticket! |
@tremby you can sort of fix with with a NextJS Webpack5 workaround: https://stackoverflow.com/a/67233156 Im not sure of the implications of doing so For my specific usage I had to do this (next.config.js):
What's strange is that redoc is already doing this: Line 50 in c09cf9d
|
Thanks. But I'm still using webpack 4 for now, and have worked around the problem in the mean time by using rc 53. |
For webpack 4 you do something like:
|
Dup of #1584 |
Between release 53 and 54. Redoc suddenly broken with any system that is using webpack 5 and nextjs (v2.0.0-rc.53...v2.0.0-rc.54)
See:
It looks like redoc is including webpack and perhaps being bundled twice. The "standalone" version of Redoc (used in React) should not be bundled/compiled. The bundling should be left to upstream. What appears to be happening is that the bundle is assuming "WEB" only while nextjs is both NODE and WEB
The text was updated successfully, but these errors were encountered: