Hello, I'm trying to deploy a Nest app with Swagger docs to Vercel. I was able to get it working by using a CDN like so:
const BASE_URL = 'https://unpkg.com/swagger-ui-dist@^5';
SwaggerModule.setup(SWAGGER_PREFIX, app, document, {
customCssUrl: `${BASE_URL}/swagger-ui.css`,
customJs: [
`${BASE_URL}/swagger-ui-bundle.js`,
`${BASE_URL}/swagger-ui-standalone-preset.js`,
],
});
However, I was wondering if there's a recommended way of doing this without the CDN, I found a couple of issues on GitHub which seem related, but was not able to find an answer:
https://github.com/nestjs/swagger/issues/2600
https://github.com/nestjs/swagger/issues/2330
Thank you!