| | |
| | | node_modules |
| | | dist |
| | | dist-ssr |
| | | dist-electron |
| | | *.local |
| | | |
| | | # Editor directories and files |
| | |
| | | "version": "0.0.0", |
| | | "main": "./src/background.js", |
| | | "scripts": { |
| | | "dev": "chcp 65001 && vite", |
| | | "dev": "vite", |
| | | "build": "vite build", |
| | | "preview": "vite preview", |
| | | "electron:dev": "vite && electron" |
| | | "electron:dev": "chcp 65001 && vite --config vite.config.electron.js" |
| | | }, |
| | | "dependencies": { |
| | | "@jitsi/electron-sdk": "^6.0.40", |
New file |
| | |
| | | import { defineConfig } from 'vite'; |
| | | import vue from '@vitejs/plugin-vue'; |
| | | import electron from 'vite-plugin-electron'; |
| | | import { resolve } from 'path'; |
| | | import AutoImport from 'unplugin-auto-import/vite'; |
| | | import Components from 'unplugin-vue-components/vite'; |
| | | import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'; |
| | | import { viteMockServe } from 'vite-plugin-mock'; |
| | | |
| | | // https://vitejs.dev/config/ |
| | | export default defineConfig({ |
| | | plugins: [ |
| | | vue(), |
| | | electron({ |
| | | // 主进程入口文件 |
| | | entry: './src/background.js' |
| | | }), |
| | | AutoImport({ |
| | | resolvers: [ElementPlusResolver()], |
| | | }), |
| | | Components({ |
| | | resolvers: [ElementPlusResolver()], |
| | | }), |
| | | |
| | | viteMockServe({ |
| | | mockPath: './src/mock', // mock 数据存放的目录 |
| | | localEnabled: true, // 开发环境启用 mock |
| | | prodEnabled: false, // 生产环境禁用 mock |
| | | }), |
| | | ], |
| | | /*开发服务器选项*/ |
| | | server: { |
| | | // 端口 |
| | | port: 3000, |
| | | proxy: { |
| | | '/api': { |
| | | // target: 'http://192.168.3.88:8000', |
| | | target: 'http://192.168.3.64:8000', |
| | | changeOrigin: true, |
| | | } |
| | | } |
| | | }, |
| | | |
| | | resolve: { |
| | | alias: { |
| | | '@': resolve(__dirname, './src') |
| | | } |
| | | } |
| | | }); |
| | |
| | | import { defineConfig } from 'vite'; |
| | | import vue from '@vitejs/plugin-vue'; |
| | | import electron from 'vite-plugin-electron'; |
| | | import { resolve } from 'path'; |
| | | import AutoImport from 'unplugin-auto-import/vite'; |
| | | import Components from 'unplugin-vue-components/vite'; |
| | |
| | | export default defineConfig({ |
| | | plugins: [ |
| | | vue(), |
| | | electron({ |
| | | // 主进程入口文件 |
| | | entry: './src/background.js' |
| | | }), |
| | | AutoImport({ |
| | | resolvers: [ElementPlusResolver()], |
| | | }), |