feat: 功能优化
This commit is contained in:
@@ -30,28 +30,7 @@ export default defineConfig(({ mode }) => {
|
||||
UnoCSS(),
|
||||
vueDevTools(),
|
||||
tailwindcss()
|
||||
// electron({
|
||||
// main: {
|
||||
// // Shortcut of `build.lib.entry`.
|
||||
// entry: 'electron/main.ts',
|
||||
// vite: {
|
||||
// build: {
|
||||
// rollupOptions: {
|
||||
// external: ['better-sqlite3'],
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// preload: {
|
||||
// input: fileURLToPath(new URL('./electron/preload.ts', import.meta.url)),
|
||||
// },
|
||||
// // See 👉 https://github.com/electron-vite/vite-plugin-electron-renderer
|
||||
// renderer:
|
||||
// process.env.NODE_ENV === 'test'
|
||||
// ? // https://github.com/electron-vite/vite-plugin-electron-renderer/issues/78#issuecomment-2053600808
|
||||
// undefined
|
||||
// : {},
|
||||
// }),
|
||||
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
@@ -82,6 +61,17 @@ export default defineConfig(({ mode }) => {
|
||||
})
|
||||
},
|
||||
},
|
||||
// OSS 代理 - 用于直传上传
|
||||
'/oss': {
|
||||
target: 'https://muye-ai-chat.oss-cn-hangzhou.aliyuncs.com',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/oss/, ''),
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
|
||||
'Access-Control-Allow-Headers': '*',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user