Skip to content

Commit

Permalink
Fix CommonJS build
Browse files Browse the repository at this point in the history
  • Loading branch information
jarda-svoboda committed Jul 9, 2023
1 parent 9c5ae92 commit accbfbd
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions tsup.config.js
Original file line number Diff line number Diff line change
@@ -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,
}));
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,
}),
);

0 comments on commit accbfbd

Please sign in to comment.