mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 16:06:08 +00:00
* chore(deps-dev): bump @antfu/eslint-config in /frontend Bumps [@antfu/eslint-config](https://github.com/antfu/eslint-config) from 9.5.1 to 10.0.0. - [Release notes](https://github.com/antfu/eslint-config/releases) - [Commits](https://github.com/antfu/eslint-config/compare/v9.5.1...v10.0.0) --- updated-dependencies: - dependency-name: "@antfu/eslint-config" dependency-version: 10.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore(frontend): migrate formatting to ESLint v10 Co-authored-by: Codex <noreply@openai.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zyy <zyycn@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com>
69 lines
1.8 KiB
TypeScript
69 lines
1.8 KiB
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
import CodexProxyUI from '@codex-proxy/ui/vite'
|
|
import VueI18n from '@intlify/unplugin-vue-i18n/vite'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { defineConfig } from 'vite'
|
|
import { pluginBridge } from './build/plugin-bridge.ts'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const sourceUi = mode === 'source'
|
|
const uiRoot = new URL('../modules/ui/', import.meta.url)
|
|
|
|
return {
|
|
base: '/',
|
|
plugins: [
|
|
vue(),
|
|
VueI18n({
|
|
include: fileURLToPath(new URL('./src/i18n/locales/**/*.json', import.meta.url)),
|
|
}),
|
|
tailwindcss(),
|
|
CodexProxyUI({
|
|
source: sourceUi ? uiRoot : undefined,
|
|
}),
|
|
pluginBridge(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/dev': {
|
|
target: 'http://127.0.0.1:8080',
|
|
changeOrigin: true,
|
|
cookiePathRewrite: { '/api/auth': '/dev/api/auth' },
|
|
rewrite: path => path.replace(/^\/dev/, ''),
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: sourceUi ? 'node_modules/.vite/source-dist' : 'dist',
|
|
assetsDir: 'assets',
|
|
license: { fileName: 'THIRD_PARTY_LICENSES.md' },
|
|
chunkSizeWarningLimit: 600,
|
|
rolldownOptions: {
|
|
checks: {
|
|
invalidAnnotation: false,
|
|
},
|
|
output: {
|
|
codeSplitting: {
|
|
groups: [
|
|
{
|
|
name: 'echarts',
|
|
test: /node_modules\/echarts/,
|
|
},
|
|
{
|
|
name: 'zrender',
|
|
test: /node_modules\/zrender/,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
})
|