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" + ] +}