From 8820d01e2610aec6dab8081b460203c83e9e1a08 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 25 Sep 2021 11:59:28 -0400 Subject: [PATCH] chore: compile to es5 (#42) * chore: compile to es5 * chore: remove unused esbuild file * chore: es5 --- esbuild.mjs | 28 ---------------------------- tsconfig.json | 4 ++-- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 esbuild.mjs diff --git a/esbuild.mjs b/esbuild.mjs deleted file mode 100644 index aa44845..0000000 --- a/esbuild.mjs +++ /dev/null @@ -1,28 +0,0 @@ -import esbuild from "esbuild"; - -const isWatch = process.argv.includes("-w"); - -esbuild - .build({ - entryPoints: ["src/index.tsx"], - outdir: "./lib", - bundle: true, - sourcemap: isWatch ? true : false, - minify: isWatch ? false : true, - splitting: true, - format: "esm", - target: ["esnext"], - watch: isWatch && { - onRebuild(err) { - err ? console.error("× Failed") : console.log("✓ Updated"); - }, - }, - define: { - "process.env.NODE_ENV": isWatch ? '"development"' : '"production"', - }, - tsconfig: "tsconfig.json", - }) - .catch((error) => { - console.log({ error }); - process.exit(1); - }); diff --git a/tsconfig.json b/tsconfig.json index ae422e9..a3fd5d3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,9 +2,9 @@ "compilerOptions": { "jsx": "react", "declaration": true, - "target": "ESNext", + "target": "es5", "lib": [ - "ESNext", + "es5", "DOM" ], "strict": true,