(opts)
| 6 | * @returns {import('tsdown').UserConfig} |
| 7 | */ |
| 8 | export function modernConfig(opts) { |
| 9 | return { |
| 10 | entry: opts.entry, |
| 11 | format: ['cjs', 'esm'], |
| 12 | target: ['chrome91', 'firefox90', 'edge91', 'safari15', 'ios15', 'opera77'], |
| 13 | // Rolldown lowers private fields for browser target arrays. Keep the |
| 14 | // transform target at ES2022 to match the syntax that tsup emitted. |
| 15 | inputOptions: { transform: { target: 'es2022' } }, |
| 16 | outDir: 'build/modern', |
| 17 | dts: true, |
| 18 | fixedExtension: false, |
| 19 | sourcemap: true, |
| 20 | clean: true, |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * @param {Object} opts - Options for building configurations. |
nothing calls this directly
no outgoing calls
no test coverage detected