Skip to content

Commit

Permalink
fix(example): try to build swagger ui with nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
jellydn committed Oct 25, 2023
1 parent a228d77 commit 2752c18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/next13-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.2",
"private": true,
"scripts": {
"build": "next build",
"build": "node --require ./swagger-build.js ./node_modules/.bin/next build",
"dev": "next dev",
"format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache",
"format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
Expand Down
3 changes: 3 additions & 0 deletions examples/next13-app/swagger-build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const { File } = require("next/dist/compiled/undici")

globalThis.File = globalThis.File ?? File

0 comments on commit 2752c18

Please sign in to comment.