mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-03-12 17:51:53 +08:00
23 lines
421 B
TypeScript
23 lines
421 B
TypeScript
import { defineConfig, Options } from 'tsup';
|
|
|
|
const packageOptions: Options = {
|
|
clean: true,
|
|
dts: true,
|
|
format: ['cjs', 'esm'],
|
|
platform: 'neutral',
|
|
sourcemap: true,
|
|
};
|
|
|
|
export default defineConfig([
|
|
{
|
|
...packageOptions,
|
|
entry: {
|
|
index: 'src/index.tsx',
|
|
},
|
|
external: ['react'],
|
|
outExtension(ctx) {
|
|
return ctx.format === 'esm' ? { js: '.mjs' } : { js: '.js' };
|
|
},
|
|
},
|
|
]);
|