feat: 添加依赖以及配置

This commit is contained in:
algerkc@qq.com
2023-12-18 16:41:56 +08:00
parent f893de62cd
commit cf598f1c9c
3 changed files with 22 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
const { app, BrowserWindow } = require('electron')
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true,
}
})
win.loadURL('http://localhost:4678/')
}
app.whenReady().then(createWindow)
+5 -1
View File
@@ -3,7 +3,9 @@
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
"serve": "vite preview" "serve": "vite preview",
"es": "vite && electron .",
"eb": "vite build && electron-builder"
}, },
"dependencies": { "dependencies": {
"@tailwindcss/postcss7-compat": "^2.2.4", "@tailwindcss/postcss7-compat": "^2.2.4",
@@ -23,6 +25,8 @@
"@vicons/antd": "^0.10.0", "@vicons/antd": "^0.10.0",
"@vitejs/plugin-vue": "^4.2.3", "@vitejs/plugin-vue": "^4.2.3",
"@vue/compiler-sfc": "^3.3.4", "@vue/compiler-sfc": "^3.3.4",
"electron": "^28.0.0",
"electron-builder": "^24.9.1",
"naive-ui": "^2.34.4", "naive-ui": "^2.34.4",
"typescript": "^4.3.2", "typescript": "^4.3.2",
"vfonts": "^0.1.0", "vfonts": "^0.1.0",
+2
View File
@@ -13,6 +13,8 @@ export default defineConfig({
}, },
server: { server: {
host: '0.0.0.0', //允许本机 host: '0.0.0.0', //允许本机
// 指定端口
port: 4678,
proxy: { proxy: {
// string shorthand // string shorthand
'/mt': { '/mt': {