import { defineConfig } from 'tsup'; export default defineConfig([ // Library build (npm package) — cjs + esm + dts // Dynamic import('./replay') is preserved; the host app's bundler // will code-split it into a separate chunk automatically. { entry: ['index.ts'], format: ['cjs', 'esm'], dts: true, splitting: false, sourcemap: false, clean: true, minify: true, }, // IIFE build (script tag: op1.js) // __OPENPANEL_REPLAY_URL__ is injected at build time so the IIFE // knows to load the replay module from the CDN instead of a // relative import (which doesn't work in a standalone script). // The replay module is excluded via an esbuild plugin so it is // never bundled into op1.js — it will be loaded lazily via