From f6c2a7a4a7f14130a3c1c44423375a0d2734ffcb Mon Sep 17 00:00:00 2001 From: Luiz Ferraz Date: Sun, 22 Dec 2024 18:47:27 -0300 Subject: [PATCH] Change bundle config --- package/package.json | 3 ++- package/tsup.config.ts | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package/package.json b/package/package.json index abe49f4..5f25570 100644 --- a/package/package.json +++ b/package/package.json @@ -38,16 +38,17 @@ }, "dependencies": { "@inox-tools/utils": "^0.3.0", - "astro-integration-kit": "^0.17.0", "chalk": "^5.4.1", "debug": "^4.4.0", "estree-walker": "^3.0.3", "hash-sum": "^2.0.0", "human-format": "^1.2.1", "magic-string": "^0.30.15", + "murmurhash-native": "^3.5.0", "pathe": "^1.1.2" }, "devDependencies": { + "astro-integration-kit": "^0.17.0", "@types/debug": "^4.1.12", "@types/hash-sum": "^1.0.2", "@types/node": "^22.10.2", diff --git a/package/tsup.config.ts b/package/tsup.config.ts index 83f5696..b64564a 100644 --- a/package/tsup.config.ts +++ b/package/tsup.config.ts @@ -1,20 +1,22 @@ import { defineConfig } from "tsup"; -import { peerDependencies } from "./package.json"; +import { peerDependencies, dependencies, devDependencies } from "./package.json"; export default defineConfig((options) => { const dev = !!options.watch; return { - entry: ["src/**/*.(ts|js)"], + entry: ["src/index.ts"], format: ["esm"], target: "node18", - bundle: false, + bundle: true, dts: true, sourcemap: true, clean: true, splitting: false, minify: !dev, + noExternal: Object.keys(devDependencies), external: [ ...Object.keys(peerDependencies), + ...Object.keys(dependencies), /node_modules/g, ], tsconfig: "tsconfig.json",