Roadmap to becoming a developer in 2022
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

22 lines
421 B

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