Files
discord.js/packages/rest/tsup.config.ts
Jeroen Claassens ac4bc3a6c8 chore(build): disable tsup minification & add "use strict"; banner to CJS bundles (#7725)
* chore(build): disable tsup minification

* chore(build): add `"use strict";` to CJS bundles
2022-03-28 21:34:58 +02:00

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";',
};
}
},
};