From 867400a784ddce4b558352af73e51d4418baccad Mon Sep 17 00:00:00 2001 From: Ignat Date: Sun, 10 May 2026 23:37:29 +0900 Subject: [PATCH 1/2] build: publish sourcemaps for core, react, vue --- packages/core/tsup.config.ts | 1 + packages/react/tsup.config.ts | 1 + packages/vue/vite.config.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.ts index aa4edcb..d0f8737 100644 --- a/packages/core/tsup.config.ts +++ b/packages/core/tsup.config.ts @@ -7,5 +7,6 @@ export default defineConfig({ clean: true, treeshake: true, minify: true, + sourcemap: true, target: 'es2020', }); diff --git a/packages/react/tsup.config.ts b/packages/react/tsup.config.ts index 96f57de..845afbd 100644 --- a/packages/react/tsup.config.ts +++ b/packages/react/tsup.config.ts @@ -7,6 +7,7 @@ export default defineConfig({ clean: true, treeshake: true, minify: true, + sourcemap: true, target: 'es2020', external: ['react', 'react-dom', '@formhaus/core'], }); diff --git a/packages/vue/vite.config.ts b/packages/vue/vite.config.ts index 22549b3..9a0ee7d 100644 --- a/packages/vue/vite.config.ts +++ b/packages/vue/vite.config.ts @@ -13,6 +13,7 @@ export default defineConfig({ }), ], build: { + sourcemap: true, lib: { entry: resolve(__dirname, 'src/index.ts'), formats: ['es'], From 363a81b3468a662aaa00f997e9170c196e75dc90 Mon Sep 17 00:00:00 2001 From: Ignat Date: Sun, 10 May 2026 23:37:29 +0900 Subject: [PATCH 2/2] chore: changeset for published sourcemaps --- .changeset/publish-sourcemaps.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/publish-sourcemaps.md diff --git a/.changeset/publish-sourcemaps.md b/.changeset/publish-sourcemaps.md new file mode 100644 index 0000000..1f22d13 --- /dev/null +++ b/.changeset/publish-sourcemaps.md @@ -0,0 +1,7 @@ +--- +"@formhaus/core": patch +"@formhaus/react": patch +"@formhaus/vue": patch +--- + +Source maps are now published alongside the minified bundles. When a form throws in a consumer's app, the stack trace points at the original source line in `src/`, not at a one-letter variable in the minified output.