Skip to content
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

Build failure from possible new release #7902

Closed
babarinde opened this issue Mar 10, 2022 · 4 comments
Closed

Build failure from possible new release #7902

babarinde opened this issue Mar 10, 2022 · 4 comments
Assignees

Comments

@babarinde
Copy link

Hi and thanks for the great work
We are running "swagger-ui": "^4.1.3",
We are noticing this error in our build logs
We had this working a few hours before build.

@scottohara
Copy link
Contributor

As of version 4.6.0, swagger-ui is now built using webpack 5.

If you are also using webpack 5 (which no longer includes node polyfills), you may need to include them.

In our case, after upgrading to v4.6.0 we had to install buffer and stream-browserify, and then update our webpack config:

resolve: {
  fallback: {
    stream: require.resolve(‘stream-browserify’)
  }
},
plugins: [
  new webpack.ProvidePlugin({
    ‘buffer’: [‘Buffer’, ‘buffer’]
  })
]

@babarinde
Copy link
Author

Downgraded to 4.5.2 in the mean time in order to figure this out

@char0n
Copy link
Member

char0n commented Mar 26, 2022

I've produced #7946 which should remedy this issue completely. No resolve.fallbacks and ProvidePlugin required anymore and the SwaggerUI will work with Create React App out of the box.

char0n added a commit that referenced this issue Mar 28, 2022
@char0n char0n self-assigned this Mar 28, 2022
@char0n
Copy link
Member

char0n commented Mar 28, 2022

@char0n char0n closed this as completed Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants