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
electron.js Normal file
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)

View File

@@ -3,7 +3,9 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
"serve": "vite preview",
"es": "vite && electron .",
"eb": "vite build && electron-builder"
},
"dependencies": {
"@tailwindcss/postcss7-compat": "^2.2.4",
@@ -23,6 +25,8 @@
"@vicons/antd": "^0.10.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vue/compiler-sfc": "^3.3.4",
"electron": "^28.0.0",
"electron-builder": "^24.9.1",
"naive-ui": "^2.34.4",
"typescript": "^4.3.2",
"vfonts": "^0.1.0",

View File

@@ -13,6 +13,8 @@ export default defineConfig({
},
server: {
host: '0.0.0.0', //允许本机
// 指定端口
port: 4678,
proxy: {
// string shorthand
'/mt': {