From ebb3ae5581b0f87e80454e1e55a18baf26d57b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Sun, 23 May 2021 14:48:01 +0800 Subject: [PATCH] chore: UPDATE vitejs-plugin-electron --- package.json | 2 +- vite.config.ts | 10 ---------- yarn.lock | 8 ++++---- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 825ca04..fd3ec45 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "ts-node": "^9.1.1", "typescript": "^4.2.4", "vite": "^2.2.4", - "vitejs-plugin-electron": "^0.0.5" + "vitejs-plugin-electron": "^0.1.0" }, "keywords": [ "vite", diff --git a/vite.config.ts b/vite.config.ts index 4be6f21..7db7853 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,7 +3,6 @@ require('dotenv').config({ path: join(__dirname, '.env') }) import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { join } from 'path' -import { builtins } from './script/utils' import electron from 'vitejs-plugin-electron' const root = join(__dirname, 'src/render') @@ -34,15 +33,6 @@ export default defineConfig(env => { commonjsOptions: {}, assetsDir: '', // 相对路径 加载问题 sourcemap: true, - rollupOptions: { - external: [ - ...builtins(), - 'electron', - ], - output: { - format: 'cjs', - }, - }, }, } }) diff --git a/yarn.lock b/yarn.lock index 2564f38..d4d9d12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2816,10 +2816,10 @@ vite@^2.2.4: optionalDependencies: fsevents "~2.3.1" -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== +vitejs-plugin-electron@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/vitejs-plugin-electron/-/vitejs-plugin-electron-0.1.0.tgz#308f603628ffc9a1821ffa9a7f7d4f1dc446796f" + integrity sha512-ftoKqmyaK7DsHe7FXPcOomUoZZ9EqpjoWGbRaXdXryE51RwpxI08ld6y/DEc08xErwu4SesTnLLQi8ZCet395A== dependencies: acorn "^8.2.4"