swcMinify causes production builds to generate incorrect swagger documentation using next-swagger-doc
#41992
Closed
1 task done
next-swagger-doc
#41992
Verify canary release
Provide environment information
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Setting
swcMinify: true
in next config causes parameter arrays in OpenAPI documentation generated by next-swagger-doc / swagger-jsdoc to render only the last parameter in the array.Expected Behavior
dev and prod output should not be different
Link to reproduction
https://github.com/billythedummy/swcminify-swagger-bug
To Reproduce
yarn install
to install dependenciesyarn dev
, you should see all 3 params in the swagger documentation generated from the jsdoc inpages/api/hello.ts
:yarn build
and run the production server withyarn start
, all params but param3 are gone:The root cause seems to be somewhere in swcMinify. Setting
swcMinify: false
innext.config.js
and runningyarn build
andyarn start
again results in the correct output.The text was updated successfully, but these errors were encountered: