diff --git a/Source/Command/Build.ts b/Source/Command/Build.ts index b20fac3c..54ea264c 100644 --- a/Source/Command/Build.ts +++ b/Source/Command/Build.ts @@ -38,7 +38,7 @@ export default async ( File, ]) ), - } satisfies Option); + } satisfies Option) as Option; await Build( Option?.ESBuild ? Merge(ESBuild, await File(Option?.ESBuild)) : ESBuild diff --git a/Source/Configuration/ESBuild.ts b/Source/Configuration/ESBuild.ts index 24b8ec83..9a44adf7 100644 --- a/Source/Configuration/ESBuild.ts +++ b/Source/Configuration/ESBuild.ts @@ -1,8 +1,6 @@ import type { PluginBuild as Build, BuildOptions as Option } from "esbuild"; import { copy as Copy } from "esbuild-plugin-copy"; -import { - rm as Remove, -} from "fs/promises"; +import { rm as Remove } from "fs/promises"; const Out = "Target"; @@ -38,4 +36,4 @@ export default { ], }), ], -} satisfies Option; +} satisfies Option as Option; diff --git a/Source/Configuration/TypeScript.json b/Source/Configuration/TypeScript.json index 27705c66..5b818ea0 100644 --- a/Source/Configuration/TypeScript.json +++ b/Source/Configuration/TypeScript.json @@ -21,7 +21,7 @@ "isolatedModules": true, "jsx": "preserve", "lib": ["ESNext"], - "module": "ESNext", + "module": "NodeNext", "moduleResolution": "NodeNext", "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, diff --git a/Target/Configuration/ESBuild.d.ts b/Target/Configuration/ESBuild.d.ts index 702ca568..81bde3c8 100644 --- a/Target/Configuration/ESBuild.d.ts +++ b/Target/Configuration/ESBuild.d.ts @@ -1,10 +1,3 @@ -declare const _default: { - format: "esm"; - minify: true; - outdir: string; - platform: "node"; - target: string; - write: true; - plugins: any[]; -}; +import type { BuildOptions as Option } from "esbuild"; +declare const _default: Option; export default _default; diff --git a/Target/Configuration/ESBuild.js b/Target/Configuration/ESBuild.js index bc508b1f..8d7d5926 100644 --- a/Target/Configuration/ESBuild.js +++ b/Target/Configuration/ESBuild.js @@ -1 +1 @@ -import{copy as e}from"esbuild-plugin-copy";import{rm as i}from"fs/promises";const t="Target";var u={format:"esm",minify:!0,outdir:t,platform:"node",target:"esnext",write:!0,plugins:[{name:"Target",setup(o){o.onStart(async()=>{try{await i(t,{recursive:!0})}catch(r){console.log(r)}})}},e({resolveFrom:"out",assets:[{from:"./Source/Configuration/TypeScript.json",to:"./Configuration/"}]})]};export{u as default}; +import{copy as e}from"esbuild-plugin-copy";import{rm as i}from"fs/promises";const t="Target";var n={format:"esm",minify:!0,outdir:t,platform:"node",target:"esnext",write:!0,plugins:[{name:"Target",setup(o){o.onStart(async()=>{try{await i(t,{recursive:!0})}catch(r){console.log(r)}})}},e({resolveFrom:"out",assets:[{from:"./Source/Configuration/TypeScript.json",to:"./Configuration/"}]})]};export{n as default}; diff --git a/Target/Configuration/TypeScript.json b/Target/Configuration/TypeScript.json index 27705c66..5b818ea0 100644 --- a/Target/Configuration/TypeScript.json +++ b/Target/Configuration/TypeScript.json @@ -21,7 +21,7 @@ "isolatedModules": true, "jsx": "preserve", "lib": ["ESNext"], - "module": "ESNext", + "module": "NodeNext", "moduleResolution": "NodeNext", "noFallthroughCasesInSwitch": true, "noImplicitOverride": true,