diff options
author | silverwind <me@silverwind.io> | 2020-12-02 02:18:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 20:18:39 -0500 |
commit | 253add883d378ec706f09a44136bc20b4ece1bf5 (patch) | |
tree | 9711bc0cf6ec61ccf63a4aca0b0896ecb25efccf /web_src/js/standalone | |
parent | b1cf7f4df11dfac879d65125880d18a03fef22c0 (diff) | |
download | gitea-253add883d378ec706f09a44136bc20b4ece1bf5.tar.gz gitea-253add883d378ec706f09a44136bc20b4ece1bf5.zip |
Swap swagger-ui with swagger-ui-dist (#13777)
* Swap swagger-ui with swagger-ui-dist
The prebuilt version of swagger-ui is identical to the regular one but
brings the benefit of faster webpack compilation and less npm
dependencies so it npm installs will speed up too.
* use bundle file directly
Diffstat (limited to 'web_src/js/standalone')
-rw-r--r-- | web_src/js/standalone/swagger.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/standalone/swagger.js b/web_src/js/standalone/swagger.js index 3378bfbab8..55cc1ab78c 100644 --- a/web_src/js/standalone/swagger.js +++ b/web_src/js/standalone/swagger.js @@ -1,5 +1,5 @@ -import SwaggerUI from 'swagger-ui'; -import 'swagger-ui/dist/swagger-ui.css'; +import SwaggerUI from 'swagger-ui-dist/swagger-ui-es-bundle.js'; +import 'swagger-ui-dist/swagger-ui.css'; window.addEventListener('load', async () => { const url = document.getElementById('swagger-ui').dataset.source; |