From 80e107cb85684a5278602b3c8f4c312d646b5df4 Mon Sep 17 00:00:00 2001 From: Jake Teton-Landis Date: Sat, 31 Aug 2024 15:40:49 -0400 Subject: [PATCH] tweak to ensure path stuff doesnt affect build --- packages/quickjs-emscripten/package.json | 2 +- .../{tsconfig.node.json => tsconfig.build.json} | 0 packages/quickjs-emscripten/tsup.config.ts | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) rename packages/quickjs-emscripten/{tsconfig.node.json => tsconfig.build.json} (100%) diff --git a/packages/quickjs-emscripten/package.json b/packages/quickjs-emscripten/package.json index f2ab5a44..655dbe69 100644 --- a/packages/quickjs-emscripten/package.json +++ b/packages/quickjs-emscripten/package.json @@ -33,7 +33,7 @@ "clean": "git clean -fx dist .output", "tsc": "npx tsc -p . --noEmit", "test:vi": "VITEST=1 npx vitest run", - "test:node": "npx tsc -p tsconfig.node.json && ./makeTestPackageJson.ts && node -r source-map-support/register --test ./.output/*node-test*.*js", + "test:node": "npx tsc -p tsconfig.build.json && ./makeTestPackageJson.ts && node -r source-map-support/register --test ./.output/*node-test*.*js", "test": "npm run test:vi && npm run test:node" }, "types": "./dist/index.d.ts", diff --git a/packages/quickjs-emscripten/tsconfig.node.json b/packages/quickjs-emscripten/tsconfig.build.json similarity index 100% rename from packages/quickjs-emscripten/tsconfig.node.json rename to packages/quickjs-emscripten/tsconfig.build.json diff --git a/packages/quickjs-emscripten/tsup.config.ts b/packages/quickjs-emscripten/tsup.config.ts index 54855028..47d83b03 100644 --- a/packages/quickjs-emscripten/tsup.config.ts +++ b/packages/quickjs-emscripten/tsup.config.ts @@ -12,11 +12,13 @@ const browsers: Extract> = [ const configs = [ extendConfig({ entry: ["src/index.ts", "src/variants.ts"], + tsconfig: "./tsconfig.node.json", format: "esm", target: ["node16", ...browsers], }), extendConfig({ entry: ["src/index.ts", "src/variants.ts"], + tsconfig: "./tsconfig.node.json", format: "cjs", }), extendConfig({