build & ci: 修改打包工具为Vite

This commit is contained in:
lblblong
2021-11-02 14:22:17 +08:00
parent e503d77cf5
commit cc0d6beb3e
25 changed files with 505 additions and 77 deletions
+13 -13
View File
@@ -1,4 +1,4 @@
import { proxy } from 'ajax-hook'
// import { proxy } from 'ajax-hook'
import localtunnel from 'localtunnel'
import { makeAutoObservable } from 'mobx'
import { openAlert } from 'src/components/alert'
@@ -14,18 +14,18 @@ declare global {
}
}
proxy({
onRequest: (config, handler) => {
if (config) config.headers['Bypass-Tunnel-Reminder'] = 'true'
handler.next(config)
},
onError: (err, handler) => {
handler.next(err)
},
onResponse: (response, handler) => {
handler.next(response)
},
})
// proxy({
// onRequest: (config, handler) => {
// if (config) config.headers['Bypass-Tunnel-Reminder'] = 'true'
// handler.next(config)
// },
// onError: (err, handler) => {
// handler.next(err)
// },
// onResponse: (response, handler) => {
// handler.next(response)
// },
// })
function getStorageID() {
return utools.getLocalId() + '_servers'