Replies: 1 comment 2 replies
-
First, install the @nestjs/swagger integration package:
if you are using the default setup, in your nest project, there should be a webpack configuration file, similar to this: const { NxWebpackPlugin } = require('@nx/webpack');
const { join } = require('path');
module.exports = {
output: {
path: join(__dirname, '../../dist/apps/my-workspace'),
},
plugins: [
new NxWebpackPlugin({
target: 'node',
compiler: 'tsc',
main: './src/main.ts',
tsConfig: './tsconfig.app.json',
assets: ['./src/assets'],
optimization: false,
outputHashing: 'none',
transformers: [{ name: '@nestjs/swagger/plugin' }], // <-- ADD the following line
}),
],
}; Add the transformer to the list of typescript compiler plugins as highlighted above. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to implement
swagger
plugin using nest docs: https://docs.nestjs.com/openapi/cli-plugin#using-the-cli-plugin.But I wasn't able to make it work in a NX monorepo
I already checked these issues:
But looks that none of the solutions are working with the latest NX version
Is it a bug or there's a way to implement
nest-cli.json
using nx?Beta Was this translation helpful? Give feedback.
All reactions