From 0454fe7574f64ce4bd82712658842e36305c27b0 Mon Sep 17 00:00:00 2001 From: Alem Tuzlak Date: Tue, 23 Sep 2025 15:32:31 +0200 Subject: [PATCH 1/3] fix bundling for solid --- packages/devtools-utils/package.json | 22 +++++++++++++++++----- packages/devtools-utils/tsconfig.json | 1 + packages/devtools-utils/tsup.config.ts | 25 +++++++++++++++++++++++++ pnpm-lock.yaml | 8 ++++++++ 4 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 packages/devtools-utils/tsup.config.ts diff --git a/packages/devtools-utils/package.json b/packages/devtools-utils/package.json index 72b3ece..5134bff 100644 --- a/packages/devtools-utils/package.json +++ b/packages/devtools-utils/package.json @@ -26,10 +26,20 @@ } }, "./solid": { - "import": { + "browser": { + "development": { + "types": "./dist/solid/esm/index.d.ts", + "import": "./dist/solid/esm/dev.js" + }, "types": "./dist/solid/esm/index.d.ts", - "default": "./dist/solid/esm/index.js" - } + "import": "./dist/solid/esm/index.js" + }, + "node": { + "types": "./dist/solid/esm/index.d.ts", + "import": "./dist/solid/esm/server.js" + }, + "types": "./dist/solid/esm/index.d.ts", + "import": "./dist/solid/esm/index.js" }, "./package.json": "./package.json" }, @@ -68,9 +78,11 @@ "test:lib:dev": "pnpm test:lib --watch", "test:types": "tsc", "test:build": "publint --strict", - "build": "vite build && vite build --config ./vite.config.solid.ts " + "build": "vite build && tsup " }, "devDependencies": { + "tsup": "^8.5.0", + "tsup-preset-solid": "^2.2.0", "vite-plugin-solid": "^2.11.8" } -} +} \ No newline at end of file diff --git a/packages/devtools-utils/tsconfig.json b/packages/devtools-utils/tsconfig.json index 179e0a5..acf9bbd 100644 --- a/packages/devtools-utils/tsconfig.json +++ b/packages/devtools-utils/tsconfig.json @@ -6,6 +6,7 @@ "extends": "../../tsconfig.json", "include": [ "src", + "tsup.config.ts", "eslint.config.js", "vite.config.ts", "tests", diff --git a/packages/devtools-utils/tsup.config.ts b/packages/devtools-utils/tsup.config.ts new file mode 100644 index 0000000..b180ec2 --- /dev/null +++ b/packages/devtools-utils/tsup.config.ts @@ -0,0 +1,25 @@ +import { defineConfig } from 'tsup' +import { generateTsupOptions, parsePresetOptions } from 'tsup-preset-solid' + +const preset_options = { + entries: { + entry: 'src/solid/index.ts', + dev_entry: true, + server_entry: true, + + }, + + cjs: false, +} + + +export default defineConfig(() => { + const parsed_data = parsePresetOptions(preset_options) + const tsup_options = generateTsupOptions(parsed_data) + + return tsup_options.map(o => ({ + ...o, + outDir: './dist/solid/esm', + clean: false + })) +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a7aeba7..89f5a98 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -468,6 +468,8 @@ importers: specifier: ^4.2.4 version: 4.2.4 + examples/react/start/generated/prisma: {} + examples/react/time-travel: dependencies: '@tanstack/devtools-event-client': @@ -625,6 +627,12 @@ importers: specifier: '>=1.9.7' version: 1.9.9 devDependencies: + tsup: + specifier: ^8.5.0 + version: 8.5.0(@microsoft/api-extractor@7.47.7(@types/node@22.15.2))(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.3)(typescript@5.9.2)(yaml@2.8.0) + tsup-preset-solid: + specifier: ^2.2.0 + version: 2.2.0(esbuild@0.25.8)(solid-js@1.9.9)(tsup@8.5.0(@microsoft/api-extractor@7.47.7(@types/node@22.15.2))(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.3)(typescript@5.9.2)(yaml@2.8.0)) vite-plugin-solid: specifier: ^2.11.8 version: 2.11.8(@testing-library/jest-dom@6.8.0)(solid-js@1.9.9)(vite@7.1.7(@types/node@22.15.2)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) From 302819aa0ae60a784b744640d93138862d257970 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 13:34:26 +0000 Subject: [PATCH 2/3] ci: apply automated fixes --- packages/devtools-utils/package.json | 2 +- packages/devtools-utils/tsup.config.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/devtools-utils/package.json b/packages/devtools-utils/package.json index 5134bff..cf8f979 100644 --- a/packages/devtools-utils/package.json +++ b/packages/devtools-utils/package.json @@ -85,4 +85,4 @@ "tsup-preset-solid": "^2.2.0", "vite-plugin-solid": "^2.11.8" } -} \ No newline at end of file +} diff --git a/packages/devtools-utils/tsup.config.ts b/packages/devtools-utils/tsup.config.ts index b180ec2..bd57209 100644 --- a/packages/devtools-utils/tsup.config.ts +++ b/packages/devtools-utils/tsup.config.ts @@ -6,20 +6,18 @@ const preset_options = { entry: 'src/solid/index.ts', dev_entry: true, server_entry: true, - }, cjs: false, } - export default defineConfig(() => { const parsed_data = parsePresetOptions(preset_options) const tsup_options = generateTsupOptions(parsed_data) - return tsup_options.map(o => ({ + return tsup_options.map((o) => ({ ...o, outDir: './dist/solid/esm', - clean: false + clean: false, })) }) From a1c8154b49fc029390c13fa823baf33cfd6fd378 Mon Sep 17 00:00:00 2001 From: Alem Tuzlak Date: Tue, 23 Sep 2025 15:55:15 +0200 Subject: [PATCH 3/3] changeset --- .changeset/true-bats-retire.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/true-bats-retire.md diff --git a/.changeset/true-bats-retire.md b/.changeset/true-bats-retire.md new file mode 100644 index 0000000..5b252cb --- /dev/null +++ b/.changeset/true-bats-retire.md @@ -0,0 +1,5 @@ +--- +'@tanstack/devtools-utils': patch +--- + +fix issue with solid bundling