From 80892eff51ebc65aa2769af03439ee8794841143 Mon Sep 17 00:00:00 2001 From: productdevbook Date: Sat, 26 Aug 2023 16:35:57 +0300 Subject: [PATCH] chore: fix example package build system --- packages/example-package/build.config.ts | 9 ++------- packages/example-package/tsup.config.ts | 21 --------------------- 2 files changed, 2 insertions(+), 28 deletions(-) delete mode 100644 packages/example-package/tsup.config.ts diff --git a/packages/example-package/build.config.ts b/packages/example-package/build.config.ts index b972b9a78..e20ccb0a1 100644 --- a/packages/example-package/build.config.ts +++ b/packages/example-package/build.config.ts @@ -1,12 +1,7 @@ import { defineBuildConfig } from 'unbuild' +const isClean = (process.env.CLEAN || 'false') === 'true' export default defineBuildConfig({ - entries: [ - { - builder: 'mkdist', - input: './src/', - pattern: ['**/!(*.test|*.stories).ts'], - }, - ], declaration: true, + clean: isClean, }) diff --git a/packages/example-package/tsup.config.ts b/packages/example-package/tsup.config.ts deleted file mode 100644 index 21686fd17..000000000 --- a/packages/example-package/tsup.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { defineConfig } from 'tsup' -import pkg from './package.json' - -const external = [ - ...Object.keys(pkg.dependencies || {}), - ...Object.keys(pkg.peerDependencies || {}), -] - -export default defineConfig((_options) => { - return [ - { - entryPoints: ['src/index.ts'], - external, - dts: true, - outDir: './dist', - target: 'es2022', - format: ['esm'], - outExtension: () => ({ js: '.mjs' }), - }, - ] -})