Files
discord.js/tsup.config.js
2022-09-02 18:08:16 +02:00

36 lines
555 B
JavaScript

import { defineConfig } from 'tsup';
export function createTsupConfig({
entry = ['src/index.ts'],
external = [],
noExternal = [],
platform = 'node',
format = ['esm', 'cjs'],
target = 'es2022',
skipNodeModulesBundle = true,
clean = true,
shims = true,
minify = false,
splitting = false,
keepNames = true,
dts = true,
sourcemap = true,
} = {}) {
return defineConfig({
entry,
external,
noExternal,
platform,
format,
skipNodeModulesBundle,
target,
clean,
shims,
minify,
splitting,
keepNames,
dts,
sourcemap,
});
}