Skip to content

Commit b5f9b84

Browse files
Merge remote-tracking branch 'upstream/main' into chore-rsc-nightly
2 parents 4920ca0 + 44567c3 commit b5f9b84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+889
-316
lines changed

.github/workflows/ci-rsc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- name: install rolldown
5959
if: ${{ matrix.rolldown }}
6060
run: |
61-
echo 'overrides: { vite: "npm:rolldown-vite@latest" }' >> pnpm-workspace.yaml
61+
sed -i '/^overrides:/a\ vite: "npm:rolldown-vite@latest"' pnpm-workspace.yaml
6262
pnpm i --no-frozen-lockfile
6363
- run: pnpm -C packages/plugin-rsc exec playwright install ${{ matrix.browser }}
6464
- run: pnpm -C packages/plugin-rsc test-e2e-ci --project=${{ matrix.browser }}
@@ -67,6 +67,6 @@ jobs:
6767
- uses: actions/upload-artifact@v4
6868
if: always()
6969
with:
70-
name: test-results-${{ matrix.os }}-${{ matrix.browser }}
70+
name: test-results-${{ matrix.os }}-${{ matrix.browser }}${{ matrix.rolldown == true && '-rolldown' || '' }}
7171
path: |
7272
packages/plugin-rsc/test-results

packages/plugin-react-oxc/build.config.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

packages/plugin-react-oxc/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
"dist"
2121
],
2222
"type": "module",
23-
"types": "./dist/index.d.mts",
24-
"exports": "./dist/index.mjs",
23+
"types": "./dist/index.d.ts",
24+
"exports": "./dist/index.js",
2525
"scripts": {
26-
"dev": "unbuild --stub",
27-
"build": "unbuild && tsx scripts/copyRefreshRuntime.ts",
26+
"dev": "tsdown --watch",
27+
"build": "tsdown",
2828
"prepublishOnly": "npm run build"
2929
},
3030
"engines": {
@@ -44,6 +44,7 @@
4444
},
4545
"devDependencies": {
4646
"@vitejs/react-common": "workspace:*",
47+
"tsdown": "^0.12.9",
4748
"unbuild": "^3.5.0",
4849
"vite": "catalog:rolldown-vite"
4950
},

packages/plugin-react-oxc/scripts/copyRefreshRuntime.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/plugin-react-oxc/src/build.d.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/plugin-react-oxc/src/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ import {
1212
import { exactRegex } from '@rolldown/pluginutils'
1313

1414
const _dirname = dirname(fileURLToPath(import.meta.url))
15-
16-
const refreshRuntimePath = globalThis.__IS_BUILD__
17-
? join(_dirname, 'refresh-runtime.js')
18-
: // eslint-disable-next-line n/no-unsupported-features/node-builtins -- only used in dev
19-
fileURLToPath(import.meta.resolve('@vitejs/react-common/refresh-runtime'))
15+
const refreshRuntimePath = join(_dirname, 'refresh-runtime.js')
2016

2117
export interface Options {
2218
include?: string | RegExp | Array<string | RegExp>

packages/plugin-react-oxc/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"include": ["src", "scripts"],
2+
"include": ["src"],
33
"compilerOptions": {
44
"outDir": "dist",
55
"target": "ES2020",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineConfig } from 'tsdown'
2+
3+
export default defineConfig({
4+
entry: 'src/index.ts',
5+
copy: [
6+
{
7+
from: 'node_modules/@vitejs/react-common/refresh-runtime.js',
8+
to: 'dist/refresh-runtime.js',
9+
},
10+
],
11+
})

packages/plugin-react-swc/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"type": "module",
1616
"private": true,
1717
"scripts": {
18-
"dev": "tsx scripts/bundle.ts --dev",
19-
"build": "tsx scripts/bundle.ts",
18+
"dev": "tsdown --watch",
19+
"build": "tsdown",
2020
"test": "playwright test"
2121
},
2222
"repository": {
@@ -40,10 +40,9 @@
4040
"@types/fs-extra": "^11.0.4",
4141
"@types/node": "^22.16.0",
4242
"@vitejs/react-common": "workspace:*",
43-
"esbuild": "^0.25.5",
4443
"fs-extra": "^11.3.0",
45-
"picocolors": "^1.1.1",
4644
"prettier": "^3.0.3",
45+
"tsdown": "^0.12.9",
4746
"typescript": "^5.8.3"
4847
}
4948
}

packages/plugin-react-swc/scripts/bundle.ts

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)