99 - ' examples/**'
1010 - ' tests/**'
1111 - ' package.json'
12- - ' vite.config.js '
12+ - ' vite.config.mjs '
1313 - ' vitest.config.js'
1414 - ' .github/workflows/**'
1515 pull_request :
@@ -20,7 +20,7 @@ concurrency:
2020 cancel-in-progress : true
2121
2222jobs :
23- # Primary job: format/lint, webpack build, then tests with coverage.
23+ # Single job: format/lint, webpack build, Vite build, then tests with coverage.
2424 build-and-test :
2525 runs-on : ubuntu-24.04
2626 steps :
@@ -47,10 +47,11 @@ jobs:
4747 - name : ESLint
4848 run : npm run lint
4949
50- # Use the webpack build for CI stability (dist via webpack )
50+ # Webpack build (legacy/dev parity )
5151 - name : Build (webpack)
5252 run : npm run build
5353
54+ # Vite library build (ESM + CJS)
5455 - name : Build (Vite)
5556 run : npm run build:vite
5657
6667 name : coverage
6768 path : coverage
6869 if-no-files-found : ignore
69-
70- # Secondary job: attempt Vite build with mitigations; doesn't fail the PR if it breaks.
71- vite-build-linux :
72- runs-on : ubuntu-24.04
73- continue-on-error : true
74- needs : build-and-test
75- steps :
76- - name : Checkout
77- uses : actions/checkout@v4
78-
79- - name : Setup Node.js (from .nvmrc)
80- uses : actions/setup-node@v4
81- with :
82- node-version-file : .nvmrc
83- cache : npm
84-
85- - name : Install dependencies
86- run : |
87- if [ -f package-lock.json ]; then
88- npm ci
89- else
90- npm install
91- fi
92-
93- - name : Diagnostics (platform and rollup)
94- run : |
95- node -e "console.log('platform:', process.platform, 'arch:', process.arch, 'node:', process.version)"
96- npm ls rollup @rollup/rollup-linux-x64-gnu vite || true
97-
98- # Workaround: ensure Linux native binary is present. Harmless if already resolved.
99- - name : Ensure rollup native linux package
100- run : npm i -D @rollup/rollup-linux-x64-gnu@^4 || true
101-
102- - name : Vite build (library)
103- run : npm run build:vite
104- env :
105- # Ask rollup to use JS fallback if native optional dep is still missing
106- ROLLUP_SKIP_NODEJS_NATIVE : ' 1'
0 commit comments