mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 13:03:50 +08:00
style: add some notes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// 百度统计代码 用于站点部署
|
||||
// 只在build:site开启
|
||||
// Baidu statistics code for site deployment
|
||||
// Only open in build:site
|
||||
export const hmScript = `<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
|
@@ -1,6 +1,7 @@
|
||||
// 修改自https://github.com/kryops/rollup-plugin-gzip
|
||||
// 因为rollup-plugin-gzip不支持vite
|
||||
// vite对css打包独立的。所以不能在打包的时候顺带打包css
|
||||
// TODO rc.9会支持 configurBuild 配置项。到时候重新修改
|
||||
|
||||
import { readFile, writeFile } from 'fs';
|
||||
import { basename } from 'path';
|
||||
|
@@ -3,6 +3,11 @@ type ProxyItem = [string, string];
|
||||
type ProxyList = ProxyItem[];
|
||||
|
||||
const reg = /^https:\/\//;
|
||||
|
||||
/**
|
||||
* Generate proxy
|
||||
* @param list
|
||||
*/
|
||||
export function createProxy(list: ProxyList = []) {
|
||||
const ret: any = {};
|
||||
for (const [prefix, target] of list) {
|
||||
@@ -12,6 +17,7 @@ export function createProxy(list: ProxyList = []) {
|
||||
target: target,
|
||||
changeOrigin: true,
|
||||
rewrite: (path: string) => path.replace(new RegExp(`^${prefix}`), ''),
|
||||
// https is require secure=false
|
||||
...(isHttps ? { secure: false } : {}),
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user