From 93027e16421c50fe548387937e6378a359fe0a35 Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Mon, 26 Feb 2024 10:51:03 +0100 Subject: [PATCH] chore: move tsup config into a file --- package.json | 4 ++-- tsup.config.ts | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 tsup.config.ts diff --git a/package.json b/package.json index d5a29140..a34050bc 100644 --- a/package.json +++ b/package.json @@ -123,8 +123,8 @@ "scripts": { "vscode:prepublish": "pnpm compile", "release": "bumpp package.json --commit --push --tag && git update-ref refs/heads/release refs/heads/main && git push origin release", - "compile": "tsup ./src/extension.ts --external vscode --minify", - "watch": "tsup ./src/extension.ts --external vscode --watch --sourcemap", + "compile": "tsup --minify", + "watch": "tsup --watch --sourcemap", "test": "vitest run --config vite.global-config.ts", "typecheck": "tsc --noEmit", "lint": "eslint --cache .", diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 00000000..65065de3 --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'tsup' + +export default defineConfig([ + { + entry: ['./src/extension.ts'], + external: ['vscode'], + format: 'cjs', + }, +])