30 Star 136 Fork 28

永夜 / swagger-document-ui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 1009 Bytes
一键复制 编辑 原始数据 按行查看 历史
const swaggerResources = require('./tests/swagger-resources');
const swaggerJson = require('./tests/unit/utils/swagger.json');
const CompressionPlugin = require('compression-webpack-plugin');
module.exports = {
filenameHashing: false,
productionSourceMap: false,
publicPath: '',
indexPath: 'swagger-ui.html',
assetsDir: 'webjars/swagger-document-ui',
devServer: {
openPage: '/swagger-ui.html',
open: true,
proxy: 'http://swagger-bootstrap-ui.xiaominfo.com',
before: function(app) {
app.get('/swagger-resources.json', function(req, res) {
res.json(swaggerResources);
});
app.get('/swagger.json', function(req, res) {
res.json(swaggerJson);
});
}
},
configureWebpack: () => {
if (process.env.NODE_ENV === 'production') {
return {
plugins: [new CompressionPlugin({ exclude: /\/*.html/ })]
};
}
}
};
JavaScript
1
https://gitee.com/cn-src/swagger-document-ui.git
git@gitee.com:cn-src/swagger-document-ui.git
cn-src
swagger-document-ui
swagger-document-ui
master

搜索帮助