diff --git a/.changeset/minify-dist.md b/.changeset/minify-dist.md new file mode 100644 index 0000000..9c2e5de --- /dev/null +++ b/.changeset/minify-dist.md @@ -0,0 +1,5 @@ +--- +'@tanstack/intent': patch +--- + +Minify the published build. The `dist` directory shrinks from 729 kB to 437 kB (40% smaller), and commands behave and print the same as before. Function and class names are kept, so a stack trace from installed code still names each function, but its positions now point into minified lines. The hook script that `intent hooks install` writes does not change. diff --git a/packages/intent/tsdown.config.ts b/packages/intent/tsdown.config.ts index 8e139e1..5109f1b 100644 --- a/packages/intent/tsdown.config.ts +++ b/packages/intent/tsdown.config.ts @@ -9,6 +9,10 @@ export default defineConfig({ format: 'esm', platform: 'node', dts: { entry: ['src/index.ts', 'src/core.ts'] }, + minify: { + compress: { keepNames: { function: true, class: true } }, + mangle: { keepNames: true }, + }, onSuccess(config) { const packageDir = fileURLToPath(new URL('.', import.meta.url)) const root = join(packageDir, '../..')