Skip to content

Commit b1f80c9

Browse files
authored
fix(query-devtools): Fix Devtools Build Issues (#5768)
1 parent 77bd2c3 commit b1f80c9

File tree

3 files changed

+140
-57
lines changed

3 files changed

+140
-57
lines changed

packages/query-devtools/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@
5353
"@solid-primitives/storage": "^1.3.11",
5454
"@tanstack/match-sorter-utils": "^8.8.4",
5555
"@tanstack/query-core": "workspace:*",
56-
"solid-js": "^1.6.13",
56+
"solid-js": "^1.7.8",
5757
"solid-transition-group": "^0.2.2",
5858
"superjson": "^1.12.4",
59-
"tsup-preset-solid": "^0.1.8",
59+
"tsup-preset-solid": "^2.0.1",
6060
"vite-plugin-solid": "^2.5.0"
6161
}
6262
}
+29-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
11
// @ts-check
22

3-
import { defineConfig } from 'tsup-preset-solid'
3+
import { defineConfig } from 'tsup'
4+
import * as preset from 'tsup-preset-solid'
45

5-
export default defineConfig(
6-
{
7-
entry: 'src/index.tsx',
8-
devEntry: true,
9-
},
10-
{
11-
dropConsole: true,
12-
cjs: true,
13-
tsupOptions: (config) => ({
14-
...config,
15-
outDir: 'build',
16-
}),
17-
},
18-
)
6+
const preset_options = {
7+
// array or single object
8+
entries: [
9+
// default entry (index)
10+
{
11+
// entries with '.tsx' extension will have `solid` export condition generated
12+
entry: 'src/index.tsx',
13+
// will generate a separate development entry
14+
dev_entry: true,
15+
},
16+
],
17+
// Set to `true` to remove all `console.*` calls and `debugger` statements in prod builds
18+
drop_console: true,
19+
// Set to `true` to generate a CommonJS build alongside ESM
20+
cjs: true,
21+
}
22+
23+
export default defineConfig(() => {
24+
const parsed_options = preset.parsePresetOptions(preset_options)
25+
const tsup_options = preset.generateTsupOptions(parsed_options)
26+
27+
tsup_options.forEach((tsup_option) => {
28+
tsup_option.outDir = 'build'
29+
})
30+
31+
return tsup_options
32+
})

pnpm-lock.yaml

+109-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)