Skip to content

Commit 1cad459

Browse files
committed
build: switch from microbundle to tsdown and add CI
Build ESM and CommonJS with tsdown 0.21, which still runs on Node 22.13. CommonJS entries are built one by one: in a shared build rolldown puts its interop helpers in index.cjs, so core.cjs and native.cjs would require it and load DOMPurify. publint runs after every build. Drop the UMD and legacy .module.mjs outputs, and raise the size limits by the 86 B and 10 B the new output costs. CI runs tests and the size check on pushes and pull requests to main.
1 parent 6a92efd commit 1cad459

5 files changed

Lines changed: 5927 additions & 11940 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: lts/*
22+
cache: npm
23+
24+
- run: npm ci
25+
- run: npm test
26+
- run: npm run build:size

‎native/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "react-html5-parser/native",
33
"private": true,
44
"main": "../dist/native.cjs",
5-
"module": "../dist/native.modern.mjs",
5+
"module": "../dist/native.js",
66
"types": "../dist/native.d.ts"
77
}

0 commit comments

Comments
 (0)