mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
* chore(build): disable tsup minification * chore(build): add `"use strict";` to CJS bundles
21 lines
393 B
TypeScript
21 lines
393 B
TypeScript
import type { Options } from 'tsup';
|
|
|
|
export const tsup: Options = {
|
|
clean: true,
|
|
dts: false,
|
|
entryPoints: ['src/index.ts'],
|
|
format: ['esm', 'cjs'],
|
|
minify: false,
|
|
keepNames: true,
|
|
skipNodeModulesBundle: true,
|
|
sourcemap: true,
|
|
target: 'es2021',
|
|
esbuildOptions: (options, context) => {
|
|
if (context.format === 'cjs') {
|
|
options.banner = {
|
|
js: '"use strict";',
|
|
};
|
|
}
|
|
},
|
|
};
|