forked from clerk/javascript
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsup.config.ts
27 lines (24 loc) · 810 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
import { esbuildPluginFilePathExtensions } from 'esbuild-plugin-file-path-extensions';
import { defineConfig } from 'tsup';
import { version as clerkJsVersion } from '../clerk-js/package.json';
import { name, version } from './package.json';
export default defineConfig(overrideOptions => {
const isWatch = !!overrideOptions.watch;
return {
format: 'esm',
outDir: './dist',
entry: ['./src/**/*.{ts,tsx,js,jsx}', '!./src/**/*.test.{ts,tsx}'],
bundle: true,
clean: true,
dts: true,
minify: false,
sourcemap: true,
define: {
PACKAGE_NAME: `"${name}"`,
PACKAGE_VERSION: `"${version}"`,
JS_PACKAGE_VERSION: `"${clerkJsVersion}"`,
__DEV__: `${isWatch}`,
},
esbuildPlugins: [esbuildPluginFilePathExtensions({ esmExtension: 'js' })],
};
});