From 02119f936da93e938ecf43b69d3c9323052c2db0 Mon Sep 17 00:00:00 2001 From: valarnin Date: Sat, 7 Dec 2024 20:45:46 -0500 Subject: [PATCH] build: Fix NPM package creation errors #535 --- .github/scripts/npm-package.cjs | 2 +- tsconfig.npm.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tsconfig.npm.json diff --git a/.github/scripts/npm-package.cjs b/.github/scripts/npm-package.cjs index e189af0d26..cbe464f7f6 100644 --- a/.github/scripts/npm-package.cjs +++ b/.github/scripts/npm-package.cjs @@ -20,7 +20,7 @@ async function main() { fs.rmSync('dist', { recursive: true, force: true }); fs.mkdirSync('npm-package'); - await exec('npx tsc --declaration'); + await exec('npx tsc -p tsconfig.npm.json --declaration'); fs.renameSync('dist/ui', 'npm-package/ui'); fsExtra.copySync('types', 'npm-package/types', {}); fs.renameSync('dist/resources', 'npm-package/resources'); diff --git a/tsconfig.npm.json b/tsconfig.npm.json new file mode 100644 index 0000000000..7764c588b4 --- /dev/null +++ b/tsconfig.npm.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "./ui", + "./types", + "./resources", + "./util", + "./test", + "./user" + ], + "exclude": [ + "./dist" + ] +}