From bc2733e3fdd06467c5e736afddb420d0a05c09ee Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Thu, 26 Oct 2023 01:19:25 +0300 Subject: [PATCH] squash! --- Configuration/ESBuild.d.ts | 14 ++++----- Configuration/ESBuild.js | 62 ++++++++++++++++++-------------------- package.json | 4 +-- 3 files changed, 39 insertions(+), 41 deletions(-) diff --git a/Configuration/ESBuild.d.ts b/Configuration/ESBuild.d.ts index 7a71458..cad71f6 100644 --- a/Configuration/ESBuild.d.ts +++ b/Configuration/ESBuild.d.ts @@ -3,12 +3,12 @@ * */ declare const _default: { - format: "esm"; - minify: true; - outdir: string; - bundle: true; - platform: "browser"; - target: string[]; - plugins: import("esbuild").Plugin[]; + format: "esm"; + minify: true; + outdir: string; + bundle: true; + platform: "browser"; + target: string[]; + plugins: import("esbuild").Plugin[]; }; export default _default; diff --git a/Configuration/ESBuild.js b/Configuration/ESBuild.js index 65f3824..39e8456 100644 --- a/Configuration/ESBuild.js +++ b/Configuration/ESBuild.js @@ -3,36 +3,34 @@ * */ export default { - format: "esm", - minify: true, - outdir: "Target", - bundle: true, - platform: "browser", - target: ["edge104", "esnext"], - plugins: [ - { - name: "Target", - setup: ({ onStart, initialOptions: { outdir } }) => - onStart(async () => { - try { - outdir - ? await ( - await import("fs/promises") - ).rm(outdir, { - recursive: true, - }) - : {}; - } catch (_Error) {} - }), - }, - (await import("esbuild-plugin-copy")).copy({ - resolveFrom: "out", - assets: [ - { - from: "./Source/styles/*.css", - to: "./styles/", - }, - ], - }), - ], + format: "esm", + minify: true, + outdir: "Target", + bundle: true, + platform: "browser", + target: ["edge104", "esnext"], + plugins: [ + { + name: "Target", + setup: ({ onStart, initialOptions: { outdir } }) => onStart(async () => { + try { + outdir + ? await (await import("fs/promises")).rm(outdir, { + recursive: true, + }) + : {}; + } + catch (_Error) { } + }), + }, + (await import("esbuild-plugin-copy")).copy({ + resolveFrom: "out", + assets: [ + { + from: "./Source/styles/*.css", + to: "./styles/", + }, + ], + }), + ], }; diff --git a/package.json b/package.json index de3140a..0d12155 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ }, "devDependencies": { "@tauri-apps/cli": "1.5.6", - "@types/node": "20.8.8", + "@types/node": "20.8.9", "esbuild-plugin-copy": "2.1.1", - "typescript-esbuild": "0.3.0", + "typescript-esbuild": "0.3.1", "vite": "4.5.0", "vite-plugin-solid": "2.7.2" },