Skip to content

Commit 65806d7

Browse files
committed
chore: update CI configuration to use vite.config.mjs and streamline build process
1 parent 20ef117 commit 65806d7

File tree

3 files changed

+5
-47
lines changed

3 files changed

+5
-47
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
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

2222
jobs:
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

@@ -66,41 +67,3 @@ jobs:
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'

package-lock.json

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@
6464
"vite": "^7.1.12",
6565
"vitest": "^4.0.7"
6666
},
67-
"optionalDependencies": {
68-
"@rollup/rollup-linux-x64-gnu": "^4.24.0"
69-
},
7067
"lint-staged": {
7168
"*.{js,jsx,ts,tsx,css,md,json}": [
7269
"prettier --write"

0 commit comments

Comments
 (0)