1 Star 0 Fork 89

Freak/ChatGPT-Desktop

forked from ayangweb/ChatGPT-Desktop 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 2.51 KB
一键复制 编辑 原始数据 按行查看 历史
俰俰晨.Leo 提交于 2023-05-04 11:23 . fix: i18n files lost after building
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import autoprefixer from 'autoprefixer'
import Unocss from 'unocss/vite'
import { presetUno, presetIcons, transformerDirectives } from 'unocss'
import presetAutoprefixer from 'unocss-preset-autoprefixer'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ArcoResolver } from 'unplugin-vue-components/resolvers'
import { visualizer } from 'rollup-plugin-visualizer'
import topLevelAwait from 'vite-plugin-top-level-await'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
export default defineConfig(async () => ({
plugins: [
vue(),
VueI18nPlugin({
include: ['./src/locales/**']
}),
Unocss({
presets: [presetUno(), presetIcons(), presetAutoprefixer()],
transformers: [
transformerDirectives({
applyVariable: ['--uno']
})
]
}),
AutoImport({
dts: './src/types/auto-import.d.ts',
eslintrc: {
enabled: true
},
imports: [
'vue',
'pinia',
'vue-i18n',
{
'@arco-design/web-vue': ['Message']
}
],
resolvers: [ArcoResolver()],
vueTemplate: true,
dirs: [
'./src/api/*',
'./src/constants/*',
'./src/hooks/*',
'./src/sqls/*',
'./src/stores/*',
'./src/utils/*'
]
}),
Components({
dts: './src/types/components.d.ts',
resolvers: [
ArcoResolver({
resolveIcons: true
})
]
}),
visualizer(),
topLevelAwait({
// The export name of top-level await promise for each chunk module
promiseExportName: '__tla',
// The function to generate import names of top-level await promise in each chunk module
promiseImportName: (i) => `__tla_${i}`
})
],
resolve: {
alias: {
'@': '/src'
}
},
clearScreen: false,
server: {
port: 1420,
strictPort: true,
host: '0.0.0.0'
},
envPrefix: ['VITE_', 'TAURI_'],
build: {
target: process.env.TAURI_PLATFORM == 'windows' ? 'chrome105' : 'safari13',
minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
sourcemap: !!process.env.TAURI_DEBUG
},
css: {
postcss: {
plugins: [
autoprefixer({
overrideBrowserslist: [
'Android 4.1',
'iOS 7.1',
'Chrome > 31',
'ff > 31',
'ie >= 8',
'last 10 versions'
]
})
]
}
}
}))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/yangfreak/ChatGPT-Desktop.git
[email protected]:yangfreak/ChatGPT-Desktop.git
yangfreak
ChatGPT-Desktop
ChatGPT-Desktop
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385