storipress/karbon

View on GitHub
packages/karbon-utils/tsup.config.ts

Summary

Maintainability
A
0 mins
Test Coverage
import type { Options } from 'tsup'
import { defineConfig } from 'tsup'

const base: Options = {
  dts: true,
  clean: true,
  noExternal: ['base64-js'],
  format: ['esm'],
}

export default defineConfig([
  {
    ...base,
    entry: ['src/index.ts'],
    outDir: 'dist/server',
    tsconfig: 'tsconfig.json',
  },
  {
    ...base,
    entry: ['src/index.browser.ts'],
    outDir: 'dist/client',
    tsconfig: 'tsconfig.json',
  },
  {
    ...base,
    entry: ['src/index.polyfill.ts'],
    outDir: 'dist/polyfill',
    tsconfig: 'tsconfig.json',
  },
])