From e5144f08cd37f39840f57394cdf15e64c6745964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Fri, 3 May 2024 21:00:17 +0800 Subject: [PATCH] fix --- vite.config.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index f7fb0a48..5aef57e5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -20,10 +20,14 @@ const nodeModules = [...builtinModules, builtinModules.map(m => `node:${m}`)].fl function genCpModule(module: string) { return { src: `./node_modules/${module}`, dest: `dist/node_modules/${module}`, flatten: false }; } +const systemPlatform = os.platform(); +let startScripts: string[] | undefined = undefined; +if (systemPlatform == "linux") { + startScripts = ['./script/napcat.sh']; +} else { + startScripts = ['./script/napcat.ps1', './script/napcat.bat', './script/napcat-utf8.bat', './script/napcat-utf8.ps1', './script/napcat-log.ps1']; +} -const startScripts: string[] = ['./script/napcat.ps1', './script/napcat.bat', './script/napcat-utf8.bat', './script/napcat-utf8.ps1', './script/napcat-log.ps1', - './script/napcat.sh' -]; // if (os.platform() !== 'win32') { // startScripts = ['./script/napcat.sh'];