Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

643 B
Raw Blame
import path from 'node:path'
import { defineConfig } from 'tsup'

export default defineConfig({
  entry: {
    index: 'src/index.ts',
    'types/index': 'src/types/index.ts',
    'zod/index': 'src/zod/index.ts',
  },
  format: ['cjs', 'esm'],
  dts: { resolve: ['@spree/sdk-core'] },
  splitting: false,
  sourcemap: true,
  clean: true,
  treeshake: true,
  minify: false,
  // sdk-core is workspace-private; inline it into the published bundle.
  noExternal: ['@spree/sdk-core', 'spark-md5'],
  esbuildOptions(options) {
    options.alias = {
      '@/types': path.resolve(import.meta.dirname, 'src/types/generated/index.ts'),
    }
  },
})