From 93082884fab3c4522076740a46ddb896f2875344 Mon Sep 17 00:00:00 2001 From: Toby Date: Wed, 21 Feb 2024 19:59:14 +0100 Subject: [PATCH] add esbuild --- .gitignore | 4 +++- .npmignore | 4 +++- package.json | 2 +- tsconfig.json | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 611dc7d..b7e79d1 100644 --- a/.gitignore +++ b/.gitignore @@ -145,4 +145,6 @@ dist # Custom /index.js -/index.d.ts \ No newline at end of file +/index.d.ts +/utils.js +/utils.d.ts \ No newline at end of file diff --git a/.npmignore b/.npmignore index 24d3af3..7ac2ae0 100644 --- a/.npmignore +++ b/.npmignore @@ -6,4 +6,6 @@ coverage/ vite.config.ts src/ tests/ -tsconfig.json \ No newline at end of file +tsconfig.json +utils.* +*.tgz \ No newline at end of file diff --git a/package.json b/package.json index 3bd600c..75b8a31 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "node": ">=18" }, "scripts": { - "build": "tsc", + "build": "tsc & esbuild --bundle --target=esnext --platform=neutral --outfile=index.js src/index.ts & wait", "test": "vitest" }, "repository": { diff --git a/tsconfig.json b/tsconfig.json index ffcaed6..1e1ed2d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "target": "esnext", "lib": ["esnext"], "declaration": true, + "emitDeclarationOnly": true, "strict": true, "noImplicitAny": true, "strictNullChecks": true,