Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test rolldown-vite #154

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,20 @@ jobs:
- run: pnpm -C examples/vue-ssr-extra build
- run: pnpm -C examples/vue-ssr-extra test-e2e-preview
- run: pnpm -C examples/vue-ssr-extra tsc

ecosystem-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.29
- run: npm i -g corepack@latest
- run: corepack enable
- run: pnpm i
- run: pnpm run vite-ecosystem-ci:build
- run: pnpm run vite-ecosystem-ci:before-test
- run: pnpm run vite-ecosystem-ci:test
3 changes: 2 additions & 1 deletion examples/browser-cli/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import repl from "node:repl";
import { createManualPromise, tinyassert } from "@hiogawa/utils";
import { chromium } from "@playwright/test";
import { parseAstAsync } from "rollup/parseAst";
import {
type Plugin,
type PluginOption,
createServer,
parseAstAsync,
// parseAstAsync,
} from "vite";
import type { ModuleRunner } from "vite/module-runner";
import { vitePluginFetchModuleServer } from "../../web-worker/src/lib/fetch-module-server";
Expand Down
9 changes: 7 additions & 2 deletions examples/react-server/src/features/unocss/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,13 @@ export function vitePluginSharedUnocss(): PluginOption {
await ctx.flushTasks();
let { css } = await ctx.uno.generate(ctx.tokens);
for (const plugin of cssPlugins) {
tinyassert(typeof plugin.transform === "function");
const result = await plugin.transform.apply(this as any, [
tinyassert(plugin.transform);
const handler =
"handler" in plugin.transform
? plugin.transform.handler
: plugin.transform;
tinyassert(typeof handler === "function");
const result = await handler.apply(this as any, [
css,
"\0virtual:unocss.css",
]);
Expand Down
3 changes: 2 additions & 1 deletion examples/react-server/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import { createDebug, tinyassert, typedBoolean } from "@hiogawa/utils";
import { vitePluginLogger } from "@hiogawa/vite-plugin-ssr-middleware";
import { vitePluginSsrMiddleware } from "@hiogawa/vite-plugin-ssr-middleware-alpha";
import react from "@vitejs/plugin-react";
import { parseAstAsync } from "rollup/parseAst";
import {
type Plugin,
type PluginOption,
type ResolvedConfig,
createServerModuleRunner,
defineConfig,
parseAstAsync,
// parseAstAsync,
} from "vite";
import {
ENTRY_BROWSER_BOOTSTRAP,
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-server-dom-webpack": "^19.0.0",
"rollup": "^4.34.2",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.7.3",
"vite": "^6.0.11",
"vite": "https://pkg.pr.new/rolldown/vite@e2990b1",
"vitest": "^3.0.3",
"wrangler": "^3.105.0"
},
"packageManager": "pnpm@10.2.0+sha512.0d27364e0139c6aadeed65ada153135e0ca96c8da42123bd50047f961339dc7a758fc2e944b428f52be570d1bd3372455c1c65fa2e7aa0bfbf931190f9552001",
"packageManager": "pnpm@9.15.5+sha512.845196026aab1cc3f098a0474b64dfbab2afe7a1b4e91dd86895d8e4aa32a7a6d03049e2d0ad770bbe4de023a7122fb68c1a1d6e0d033c7076085f9d5d4800d4",
"volta": {
"node": "22.13.1"
},
Expand Down
Loading
Loading