我想将swagger-ui.css,swagger-ui-standalone-preset.js和swagger-ui-bundle.js放在本地,所以我在下面做了:
const swaggerUiAssetPath = require("swagger-ui-dist").getAbsoluteFSPath();
<link rel="stylesheet" type="text/css" href=${ swaggerUiAssetPath +
"swagger-ui.css"}>
<script src=${ swaggerUiAssetPath + "swagger-ui-standalone-preset.js"}></script>
<script src=${ swaggerUiAssetPath + "swagger-ui-bundle.js"}></script>
但它给出了referenceError:swaggerUIBundle未定义。有谁知道如何解决问题,