Skip to content
3 changes: 3 additions & 0 deletions packages/solid-query-devtools/.attw.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was copied from react-query-devtools

"ignoreRules": ["no-resolution"]
}
62 changes: 47 additions & 15 deletions packages/solid-query-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,60 @@
"build:dev": "tsup --watch"
},
"type": "module",
"main": "./build/index.cjs",
"module": "./build/index.js",
"types": "./build/index.d.ts",
"main": "./build/index/index.cjs",
"module": "./build/index/index.js",
"types": "./build/index/index.d.ts",
Comment on lines +35 to +37
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is and index directory with an index.ext file really correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does seem to be correct. I'm not sure if we should adjust the tsup.config.ts so it generates a more flat structure but with the Solid preset i'm not totally sure how we can do that.

Screenshot 2025-09-06 at 1 35 35 pm

"browser": {},
"exports": {
"@tanstack/custom-condition": "./src/index.ts",
"solid": {
"development": "./build/dev.jsx",
"import": "./build/index.jsx"
".": {
"@tanstack/custom-condition": "./src/index.tsx",
"solid": {
"development": "./build/index/dev.jsx",
"import": "./build/index/index.jsx"
},
"development": {
"import": {
"types": "./build/index/index.d.ts",
"default": "./build/index/dev.js"
},
"require": "./build/index/dev.cjs"
},
"import": {
"types": "./build/index/index.d.ts",
"default": "./build/index/index.js"
},
"require": "./build/index/index.cjs"
},
"development": {
"./production": {
"@tanstack/custom-condition": "./src/production.tsx",
"solid": {
"development": "./build/production/dev.jsx",
"import": "./build/production/index.jsx"
},
"development": {
"import": {
"types": "./build/production/index.d.ts",
"default": "./build/production/dev.js"
},
"require": "./build/production/dev.cjs"
},
"import": {
"types": "./build/index.d.ts",
"default": "./build/dev.js"
"types": "./build/production/index.d.ts",
"default": "./build/production/index.js"
},
"require": "./build/dev.cjs"
"require": "./build/production/index.cjs"
},
"import": {
"types": "./build/index.d.ts",
"default": "./build/index.js"
"./build/production/index.js": {
"import": {
"types": "./build/production/index.d.ts",
"default": "./build/production/index.js"
},
"require": {
"types": "./build/production/index.d.cts",
"default": "./build/production/index.cjs"
}
},
"require": "./build/index.cjs"
"./package.json": "./package.json"
},
"files": [
"build",
Expand Down
12 changes: 12 additions & 0 deletions packages/solid-query-devtools/src/production.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import clientOnly from './clientOnly'
import type SolidQueryDevtoolsComp from './devtools'
import type SolidQueryDevtoolsCompPanel from './devtoolsPanel'

export const SolidQueryDevtools: typeof SolidQueryDevtoolsComp = clientOnly(
() => import('./devtools'),
)

export const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsCompPanel =
clientOnly(() => import('./devtoolsPanel'))

export type { DevtoolsPanelOptions } from './devtoolsPanel'
15 changes: 11 additions & 4 deletions packages/solid-query-devtools/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ import { defineConfig } from 'tsup'
import { generateTsupOptions, parsePresetOptions } from 'tsup-preset-solid'

const preset_options = {
entries: {
entry: 'src/index.tsx',
dev_entry: true,
},
entries: [
{
entry: 'src/index.tsx',
dev_entry: true,
},
{
name: 'production',
entry: 'src/production.tsx',
dev_entry: true,
},
],
cjs: true,
drop_console: true,
}
Expand Down
Loading