mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
* feat: dispose hooks * build: unminify, add source map, deprecate useContainerRaw * fix regression of context and fix tsup build
25 lines
599 B
JavaScript
25 lines
599 B
JavaScript
import { defineConfig } from 'tsup';
|
|
const shared = {
|
|
entry: ['src/index.ts'],
|
|
external: ['discord.js', 'iti'],
|
|
platform: 'node',
|
|
clean: true,
|
|
sourcemap: true,
|
|
treeshake: {
|
|
moduleSideEffects: false,
|
|
correctVarValueBeforeDeclaration: true, //need this to treeshake esm discord.js empty import
|
|
annotations: true,
|
|
},
|
|
};
|
|
export default defineConfig([
|
|
{
|
|
format: ['esm', 'cjs'],
|
|
target: 'node18',
|
|
tsconfig: './tsconfig.json',
|
|
outDir: './dist',
|
|
minify: false,
|
|
dts: true,
|
|
...shared,
|
|
},
|
|
]);
|