1 Star 0 Fork 27

坤崵/yn

forked from 洋子/yn 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
洋子 提交于 2021-07-13 18:41 . fix: 修复表格图表不能用问题
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import fs from 'fs-extra'
// copy vs
fs.copySync(
path.resolve(__dirname, 'node_modules/monaco-editor/min/vs'),
path.resolve(__dirname, 'src/renderer/public/vs')
)
fs.copySync(
path.resolve(__dirname, 'node_modules/luckysheet/dist'),
path.resolve(__dirname, 'src/renderer/public/embed')
)
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
root: 'src/renderer',
server: {
port: 8066,
proxy: {
'/static': {
target: 'http://localhost:3044'
},
'/api': {
target: 'http://localhost:3044'
},
'/ws': {
target: 'http://localhost:3044',
ws: true
}
}
},
resolve: {
alias: [
{ find: /^vue$/, replacement: 'vue/dist/vue.esm-bundler.js' },
{ find: /^@\//, replacement: path.resolve(__dirname, 'src') + '/' },
{ find: /^@fe\//, replacement: path.resolve(__dirname, 'src', 'renderer') + '/' },
]
},
build: {
outDir: '../../dist/renderer',
emptyOutDir: true,
rollupOptions: {
input: {
main: path.resolve(__dirname, 'src/renderer/index.html'),
embed: path.resolve(__dirname, 'src/renderer/embed/index.html')
}
}
}
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/wawowo/yn.git
git@gitee.com:wawowo/yn.git
wawowo
yn
yn
develop

搜索帮助