Open History to see the last commit
1import { defineConfig } from 'tsup'
2import { generateTsupOptions, parsePresetOptions } from 'tsup-preset-solid'
3
4const index_preset = {
5 entries: {
6 entry: 'src/index.ts',
7 dev_entry: true,
8 server_entry: true,
9 },
10 cjs: false,
11 drop_console: true,
12}
13
14const production_preset = {
15 entries: {
16 entry: 'src/production.ts',
17 dev_entry: true,
18 server_entry: true,
19 },
20 cjs: false,
21 drop_console: true,
22 out_dir: 'dist/production',
23}
24export default defineConfig(() => {
25 const index_options = generateTsupOptions(parsePresetOptions(index_preset))
26 const production_options = generateTsupOptions(
27 parsePresetOptions(production_preset),
28 )
29
30 return [...index_options, ...production_options].map((option) => ({
31 ...option,
32 clean: false,
33 }))
34})