Open DavieReid opened 1 year ago
The OpenApiComponent renders the react-swagger component without any styling.
I suspect the root cause is the fact that esbuild is told to exclude node_modules when bundling the open API component https://github.com/jpmorganchase/mosaic/blob/main/scripts/bundle.js#L36
The package.json file also mentions a dist/index.css file which is incorrect. Should be dist/styles.css.
package.json
dist/index.css
dist/styles.css
Adding the following CSS import to _app.tsx will apply swagger styling
_app.tsx
import '@jpmorganchase/mosaic-open-api-component/index.css';
Add the following CSS import to _app.tsx
import 'swagger-ui-react/swagger-ui.css';
Still open ?
Yes, still open
The OpenApiComponent renders the react-swagger component without any styling.
Root Cause
I suspect the root cause is the fact that esbuild is told to exclude node_modules when bundling the open API component https://github.com/jpmorganchase/mosaic/blob/main/scripts/bundle.js#L36
The
package.json
file also mentions adist/index.css
file which is incorrect. Should bedist/styles.css
.Expected Result
Adding the following CSS import to
_app.tsx
will apply swagger stylingWorkaround
Add the following CSS import to
_app.tsx