Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,70 @@ jobs:
name: playwright-report-dev
path: packages/static/playwright-report-dev/
retention-days: 30

e2e-vite7:
runs-on: ubuntu-latest
needs: ci

steps:
- uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "pnpm"

- name: Swap catalog to Vite 7
run: |
sed -i \
-e 's|^\( "@vitejs/plugin-react":\).*|\1 ^5.1.4|' \
-e 's|^\( vite:\).*|\1 ^7.3.1|' \
pnpm-workspace.yaml
grep -q '"@vitejs/plugin-react": \^5\.1\.4' pnpm-workspace.yaml
grep -q 'vite: \^7\.3\.1' pnpm-workspace.yaml

- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Build
run: pnpm --filter @funstack/static build

- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}

- name: Install Playwright system dependencies
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm --filter @funstack/static exec playwright install-deps chromium

- name: Install Playwright browsers
run: pnpm --filter @funstack/static exec playwright install chromium

- name: Run e2e tests (build)
run: pnpm run test:e2e

- name: Run e2e tests (dev server)
run: pnpm run test:e2e:dev

- name: Upload Playwright report (build, Vite 7)
uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-build-vite7
path: packages/static/playwright-report/
retention-days: 30

- name: Upload Playwright report (dev server, Vite 7)
uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-dev-vite7
path: packages/static/playwright-report-dev/
retention-days: 30
2 changes: 1 addition & 1 deletion packages/static/e2e/fixture-multi-entry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@funstack/static": "workspace:*",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.4",
"@vitejs/plugin-react": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"vite": "catalog:"
Expand Down
2 changes: 1 addition & 1 deletion packages/static/e2e/fixture-ssr-defer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@funstack/static": "workspace:*",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.4",
"@vitejs/plugin-react": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"vite": "catalog:"
Expand Down
2 changes: 1 addition & 1 deletion packages/static/e2e/fixture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@funstack/static": "workspace:*",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.4",
"@vitejs/plugin-react": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"vite": "catalog:"
Expand Down
2 changes: 1 addition & 1 deletion packages/static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@
"peerDependencies": {
"react": "^19.2.3",
"react-dom": "^19.2.3",
"vite": "catalog:"
"vite": "^7.0.0 || ^8.0.0"
}
}
7 changes: 6 additions & 1 deletion packages/static/src/plugin/getRSCEntryPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import type { RunnableDevEnvironment } from "vite";
* Get the entry point module of the RSC environment.
*/
export async function getRSCEntryPoint(environment: RunnableDevEnvironment) {
const rscInput = environment.config.build.rollupOptions?.input;
// Vite 8 renamed rollupOptions to rolldownOptions; support both for Vite 7 compat
const buildConfig = environment.config.build;
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Vite 7 compat
const rscInput = (
buildConfig.rolldownOptions ?? (buildConfig as any).rollupOptions
)?.input;
const source =
rscInput !== undefined &&
typeof rscInput !== "string" &&
Expand Down
Loading