mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 22:47:17 +00:00
25 lines
630 B
TypeScript
25 lines
630 B
TypeScript
import { parseArgs } from 'node:util';
|
|
import { defineConfig } from 'tsup';
|
|
import {
|
|
commonWatchList,
|
|
monorepoWatchList,
|
|
targetFromNodeVersion,
|
|
watchEntryPlugin,
|
|
} from './utils';
|
|
|
|
const entryPoints = parseArgs({
|
|
allowPositionals: true,
|
|
strict: false,
|
|
}).positionals;
|
|
|
|
export default defineConfig({
|
|
entryPoints: entryPoints.length ? entryPoints : ['src/index.ts'],
|
|
splitting: false,
|
|
sourcemap: true,
|
|
clean: true,
|
|
shims: true,
|
|
format: 'esm',
|
|
watch: process.env.WATCH === '0' ? false : [...commonWatchList(), ...monorepoWatchList()],
|
|
target: targetFromNodeVersion(),
|
|
plugins: [watchEntryPlugin()],
|
|
});
|