Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eca3f17

Browse files
Configure tsup
1 parent d85f253 commit eca3f17

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

‎.github/workflows/continuous-integration.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
- run: pnpm install
1515
- run: pnpm run test
1616
- run: pnpm run typecheck
17+
- run: pnpm run build
1718
# FIXME: To be reactivated
1819
# - run: pnpm run lint
1920
# - run: pnpm run smoke cjs 19.0.0

‎package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"version": "17.0.0",
44
"description": "Turn a ReactElement into the corresponding JSX string.",
55
"packageManager": "pnpm@9.15.2",
6-
"main": "dist/cjs/index.js",
7-
"module": "dist/esm/index.js",
8-
"browser": "dist/cjs/index.js",
9-
"types": "index.d.ts",
6+
"main": "dist/index.mjs",
7+
"module": "dist/index.mjs",
8+
"browser": "dist/index.js",
9+
"types": "dist/index.d.ts",
1010
"scripts": {
1111
"build": "tsup",
1212
"prebuild": "rm -rf dist/",

‎tsconfig.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"esModuleInterop": true,
1212
"noEmit": true
1313
},
14-
"include": ["src/"],
14+
"include": ["src/", "vitest.config.ts", "tsup.config.ts"],
1515
"exclude": ["node_modules/"]
1616
}

‎tsup.config.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from 'tsup';
2+
3+
export default defineConfig({
4+
entry: ['src/index.ts'],
5+
format: ['esm', 'cjs'],
6+
splitting: true,
7+
sourcemap: true,
8+
clean: true,
9+
dts: true,
10+
metafile: true,
11+
target: ['node20', 'es2015'],
12+
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /