Skip to content

Commit 47655bc

Browse files
committed
Reduce bundle size, clean up build command
1 parent db5178a commit 47655bc

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.changeset/legal-ants-study.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'better-auth-harmony': patch
3+
---
4+
5+
Reduce bundle size with improved tree-shaking

packages/plugins/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"lint": "eslint .",
99
"typecheck": "tsc --noEmit --project tsconfig.build.json",
1010
"emit-types": "rimraf -g dist/**/*{.ts,.ts.map}; tsc --emitDeclarationOnly --declaration --project tsconfig.build.json",
11-
"build": "tsup --clean --dts --minify --tsconfig tsconfig.build.json",
11+
"build": "tsup",
1212
"test": "vitest run --coverage --coverage.include=src",
1313
"test:watch": "vitest"
1414
},

packages/plugins/tsup.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ export default defineConfig(() => ({
5757
},
5858
format: ['esm', 'cjs'],
5959
bundle: true,
60+
clean: true,
61+
dts: true,
62+
minify: true,
63+
tsconfig: 'tsconfig.build.json',
64+
treeshake: {
65+
preset: 'smallest'
66+
},
6067
splitting: false,
6168
cjsInterop: true,
6269
esbuildPlugins: [

0 commit comments

Comments
 (0)