From 4cbd61b6b3dcd1f43ee3493dd1a103865e53f454 Mon Sep 17 00:00:00 2001 From: ienaga Date: Sat, 11 Nov 2023 13:57:41 +0900 Subject: [PATCH] =?UTF-8?q?JavaScript=E3=81=AE=E3=83=86=E3=83=B3=E3=83=97?= =?UTF-8?q?=E3=83=AC=E3=83=BC=E3=83=88=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/index.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f38cde8..b34b744 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@next2d/builder", - "version": "0.0.7", + "version": "0.0.8", "description": "Multi-platform builder for Next2d Framework, supporting export to various platforms such as macOS, Windows, iOS, Android and Web(HTML)", "author": "Toshiyuki Ienaga ", "license": "MIT", diff --git a/src/index.ts b/src/index.ts index 8776815..a1296f5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -176,12 +176,14 @@ const loadConfig = (): Promise => ); } + const ext: string = fs.existsSync(`${process.cwd()}/vite.config.ts`) ? "ts" : "js"; + const config: any = await loadConfigFromFile( { "command": "build", "mode": "build" }, - `${process.cwd()}/vite.config.ts` + `${process.cwd()}/vite.config.${ext}` ); // update config