- SFTP模块:连接/断开/文件CRUD/系统信息采集/base64二进制写入 - 连接池:多服务器同时在线,瞬间切换profile - autoConnect:启动时自动连接所有非本地服务器 - 端口自动回退:listenWithFallback消除TOCTOU,解决端口冲突崩溃 - 文件服务器URL集中管理:file-server.ts消除8+处硬编码端口 - Sidebar设置面板:添加服务器/自动连接/自动刷新开关 - 修复:validateFilePath越界panic、正则预编译 - 修复:注释准确性(RemoveAll/端口8073/动态端口文档)
48 lines
1.3 KiB
JavaScript
48 lines
1.3 KiB
JavaScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { resolve } from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { ArcoResolver } from 'unplugin-vue-components/resolvers'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({
|
|
imports: ['vue'],
|
|
dts: 'src/auto-imports.d.ts',
|
|
}),
|
|
Components({
|
|
resolvers: [ArcoResolver({ sideEffect: true })],
|
|
dts: 'src/components.d.ts',
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
'@bindings': resolve(__dirname, 'bindings'),
|
|
'@wailsio/events': fileURLToPath(new URL('./node_modules/@wailsio/runtime/dist/events.js', import.meta.url))
|
|
}
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
sourcemap: false,
|
|
minify: 'esbuild',
|
|
cssCodeSplit: true,
|
|
chunkSizeWarningLimit: 1000,
|
|
target: 'es2020',
|
|
rollupOptions: {
|
|
output: {
|
|
chunkFileNames: 'assets/js/[name]-[hash].js',
|
|
entryFileNames: 'assets/js/[name]-[hash].js',
|
|
assetFileNames: 'assets/[ext]/[name]-[hash].[ext]'
|
|
}
|
|
}
|
|
},
|
|
optimizeDeps: {
|
|
include: ['vue', 'pinia', '@arco-design/web-vue', 'marked', 'highlight.js']
|
|
}
|
|
})
|