Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/query-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
"@solid-primitives/storage": "^1.3.11",
"@tanstack/match-sorter-utils": "^8.8.4",
"@tanstack/query-core": "workspace:*",
"solid-js": "^1.6.13",
"solid-js": "^1.7.8",
"solid-transition-group": "^0.2.2",
"superjson": "^1.12.4",
"tsup-preset-solid": "^0.1.8",
"tsup-preset-solid": "^2.0.1",
"vite-plugin-solid": "^2.5.0"
}
}
44 changes: 29 additions & 15 deletions packages/query-devtools/tsup.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
// @ts-check

import { defineConfig } from 'tsup-preset-solid'
import { defineConfig } from 'tsup'
import * as preset from 'tsup-preset-solid'

export default defineConfig(
{
entry: 'src/index.tsx',
devEntry: true,
},
{
dropConsole: true,
cjs: true,
tsupOptions: (config) => ({
...config,
outDir: 'build',
}),
},
)
const preset_options = {
// array or single object
entries: [
// default entry (index)
{
// entries with '.tsx' extension will have `solid` export condition generated
entry: 'src/index.tsx',
// will generate a separate development entry
dev_entry: true,
},
],
// Set to `true` to remove all `console.*` calls and `debugger` statements in prod builds
drop_console: true,
// Set to `true` to generate a CommonJS build alongside ESM
cjs: true,
}

export default defineConfig(() => {
const parsed_options = preset.parsePresetOptions(preset_options)
const tsup_options = preset.generateTsupOptions(parsed_options)

tsup_options.forEach((tsup_option) => {
tsup_option.outDir = 'build'
})

return tsup_options
})
149 changes: 109 additions & 40 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.