forked from clerk/javascript
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsup.config.ts
29 lines (26 loc) · 855 Bytes
/
tsup.config.ts
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
import { defineConfig } from 'tsup';
import { version as clerkJsVersion } from '../clerk-js/package.json';
import { name, version } from './package.json';
export default defineConfig(overrideOptions => {
const isProd = overrideOptions.env?.NODE_ENV === 'production';
return {
clean: true,
define: {
PACKAGE_NAME: `"${name}"`,
PACKAGE_VERSION: `"${version}"`,
JS_PACKAGE_VERSION: `"${clerkJsVersion}"`,
__DEV__: `${!isProd}`,
},
dts: true,
entry: {
index: 'src/index.ts',
'react/common/index': 'src/react/common/index.ts',
'react/sign-in/index': 'src/react/sign-in/index.ts',
'react/sign-up/index': 'src/react/sign-up/index.ts',
},
external: ['react', 'react-dom', 'next', '@statelyai/inspect'],
format: ['cjs', 'esm'],
minify: false,
sourcemap: true,
};
});