Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

tsup.config.js

24 lines513 Bytes

1// @ts-check
2​
3import { defineConfig } from 'tsup'
4import { generateTsupOptions, parsePresetOptions } from 'tsup-preset-solid'
5​
6const preset_options = {
7 entries: {
8 entry: 'src/index.tsx',
9 dev_entry: true,
10 },
11 cjs: true,
12 drop_console: true,
14​
15export default defineConfig(() => {
16 const parsed_data = parsePresetOptions(preset_options)
17 const tsup_options = generateTsupOptions(parsed_data)
18​
19 tsup_options.forEach((tsup_option) => {
20 tsup_option.outDir = 'build'
21 })
22​
23 return tsup_options
24})