Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Nov 28, 2023
1 parent de64291 commit b7fd912
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 39 deletions.
14 changes: 7 additions & 7 deletions Configuration/ESBuild.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
62 changes: 30 additions & 32 deletions Configuration/ESBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
},
],
}),
],
};

0 comments on commit b7fd912

Please sign in to comment.