From accbfbdc8ef1256f94cf44e7bab112d01e80cb74 Mon Sep 17 00:00:00 2001 From: Jayk <20700514+jayk09@users.noreply.github.com> Date: Mon, 10 Jul 2023 01:08:20 +0200 Subject: [PATCH] Fix CommonJS build --- tsup.config.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tsup.config.js b/tsup.config.js index dee05fd..f0e1593 100644 --- a/tsup.config.js +++ b/tsup.config.js @@ -1,12 +1,16 @@ /* eslint-disable */ import { defineConfig } from 'tsup'; -export default defineConfig((options) => ({ - clean: true, - dts: true, - format: ['cjs', 'esm'], - entry: ['src/index.ts'], - watch: options.watch && ['src/*'], - minify: !options.watch, - sourcemap: options.watch, -})); \ No newline at end of file +export default defineConfig( + /** @type {() => import('tsup').Options} */ + (options) => ({ + clean: true, + dts: true, + format: ['cjs', 'esm'], + entry: ['src/index.ts'], + watch: options.watch && ['src/*'], + minify: !options.watch, + sourcemap: options.watch, + splitting: true, + }), +); \ No newline at end of file