forked from joshpuckett/dialkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
57 lines (56 loc) · 1.32 KB
/
tsup.config.ts
File metadata and controls
57 lines (56 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { defineConfig } from 'tsup';
import { solidPlugin } from 'esbuild-plugin-solid';
export default defineConfig([
// Store build (shared across all framework entries)
{
entry: { index: 'src/store/DialStore.ts' },
outDir: 'dist/store',
format: ['esm', 'cjs'],
dts: true,
splitting: false,
sourcemap: true,
},
// React build
{
entry: ['src/index.ts'],
format: ['esm', 'cjs'],
dts: true,
splitting: false,
sourcemap: true,
external: ['react', 'react-dom', 'motion'],
esbuildOptions(options) {
options.banner = {
js: '"use client";',
};
},
onSuccess: 'cp src/styles/theme.css dist/styles.css',
},
// Solid build
{
entry: { index: 'src/solid/index.ts' },
outDir: 'dist/solid',
format: ['esm', 'cjs'],
dts: {
compilerOptions: {
jsx: 'preserve',
jsxImportSource: 'solid-js',
},
},
splitting: false,
sourcemap: true,
external: ['solid-js', 'solid-js/web', 'motion'],
tsconfig: 'tsconfig.solid.json',
esbuildPlugins: [solidPlugin()],
},
// Vue build
{
entry: { index: 'src/vue/index.ts' },
outDir: 'dist/vue',
format: ['esm', 'cjs'],
dts: true,
splitting: false,
sourcemap: true,
external: ['vue', 'motion-v'],
tsconfig: 'tsconfig.vue.json',
},
]);