1 Star 0 Fork 2

王友全/mossgpt-mtools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.ts 905 Bytes
一键复制 编辑 原始数据 按行查看 历史
lblblong 提交于 2023-03-12 22:21 . 优化构建方式
import react from '@vitejs/plugin-react-swc'
import copy from 'rollup-plugin-copy'
import { defineConfig } from 'vite'
import { viteDelDev } from './vite.del-dev'
import { vitePluginPreload } from './vite.preload'
export default defineConfig(({ command }) => {
const prePlugins =
command === 'serve'
? [
copy({
hook: 'buildStart',
verbose: false,
targets: [
{
src: 'public/*',
dest: 'dist',
},
],
}),
]
: [viteDelDev()]
return {
base: './',
resolve: {
alias: [
{
find: /^~/,
replacement: '',
},
],
},
plugins: [
...prePlugins,
vitePluginPreload(
'./src/preload.ts',
command === 'serve' ? 'buildStart' : 'writeBundle'
),
react(),
],
}
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xuruiju/mossgpt-mtools.git
git@gitee.com:xuruiju/mossgpt-mtools.git
xuruiju
mossgpt-mtools
mossgpt-mtools
master

搜索帮助