Skip to content

Commit 6b5ac31

Browse files
committed
exclude storybook files from tsup bundle
1 parent 067bd5b commit 6b5ac31

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

.github/workflows/ci.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: pnpm/action-setup@v4
13+
- run: pnpm install
14+
- run: pnpm build

tsup.config.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ import { esbuildPluginFilePathExtensions } from "esbuild-plugin-file-path-extens
33
import { defineConfig } from "tsup";
44
export default defineConfig([
55
{
6-
entry: ["src/**/*.ts", "src/**/*.tsx", "src/**/*.css"],
6+
entry: [
7+
"src/**/*.ts",
8+
"src/**/*.tsx",
9+
"!src/**/*.stories.tsx",
10+
"!src/**/*.stories.ts",
11+
"src/**/*.css",
12+
],
713
format: ["cjs", "esm"],
8-
target: ["es2020", "node16"],
14+
target: ["es2020"],
915
outDir: "build",
1016
dts: true,
1117
sourcemap: true,

0 commit comments

Comments
 (0)