mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-31 20:16:36 +08:00
chore: update vitejs-plugin-electron
This commit is contained in:
parent
e7406e9c13
commit
3aa431ccfd
@ -76,7 +76,7 @@
|
||||
"ts-node": "^9.1.1",
|
||||
"typescript": "^4.2.4",
|
||||
"vite": "^2.2.4",
|
||||
"vitejs-plugin-electron": "^0.0.4"
|
||||
"vitejs-plugin-electron": "^0.0.5"
|
||||
},
|
||||
"keywords": [
|
||||
"vite",
|
||||
|
@ -9,13 +9,11 @@ import electron from 'vitejs-plugin-electron'
|
||||
const root = join(__dirname, 'src/render')
|
||||
|
||||
export default defineConfig(env => {
|
||||
const isserve = env.command === 'serve'
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
vue(),
|
||||
isserve && electron({}),
|
||||
].filter(Boolean),
|
||||
electron(),
|
||||
],
|
||||
root,
|
||||
base: './', // index.html 中静态资源加载位置
|
||||
server: {
|
||||
@ -29,11 +27,6 @@ export default defineConfig(env => {
|
||||
'@root': __dirname,
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: [
|
||||
'electron',
|
||||
],
|
||||
},
|
||||
build: {
|
||||
outDir: join(__dirname, 'dist/render'),
|
||||
emptyOutDir: true,
|
||||
|
@ -2816,10 +2816,10 @@ vite@^2.2.4:
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.1"
|
||||
|
||||
vitejs-plugin-electron@^0.0.4:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/vitejs-plugin-electron/-/vitejs-plugin-electron-0.0.4.tgz#b6ce83510572cf50c55cc9f35d6a847d7fcd67b4"
|
||||
integrity sha512-mD4weY2OJaDY48i5P4LNYV10wS490MvZG4y9egfve75Qs89nZ6G8mfdRId+3bL36AKGJuvEWLiuzpV0dHSAqwA==
|
||||
vitejs-plugin-electron@^0.0.5:
|
||||
version "0.0.5"
|
||||
resolved "https://registry.yarnpkg.com/vitejs-plugin-electron/-/vitejs-plugin-electron-0.0.5.tgz#4c561f5aaa7dcbe3e49805fd89e45299709a984a"
|
||||
integrity sha512-82fw7iQerT5/pMuLcadFtVVpvkIVPSefHXOkK2ptuCIwsV4Z7zzydwQPJjZ2zYPA7J1flEakHiJeidxyCNgA9Q==
|
||||
dependencies:
|
||||
acorn "^8.2.4"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user