File tree Expand file tree Collapse file tree 4 files changed +33
-17
lines changed
Expand file tree Collapse file tree 4 files changed +33
-17
lines changed Original file line number Diff line number Diff line change @@ -31,18 +31,21 @@ jobs:
3131 - run : pnpm -C packages/plugin-rsc test
3232
3333 test-e2e :
34- name : test-rsc (${{ matrix.os }} / ${{ matrix.browser }})
34+ name : test-rsc (${{ matrix.os }} / ${{ matrix.browser }}) ${{ matrix.rolldown == true && '(rolldown)' || '' }}
3535 runs-on : ${{ matrix.os }}
3636 strategy :
37- # TODO: shard?
3837 matrix :
3938 os : [ubuntu-latest, macos-latest, windows-latest]
4039 browser : [chromium]
40+ rolldown : [false]
4141 include :
4242 - os : ubuntu-latest
4343 browser : firefox
4444 - os : macos-latest
4545 browser : webkit
46+ - os : ubuntu-latest
47+ browser : chromium
48+ rolldown : true
4649 fail-fast : false
4750 steps :
4851 - uses : actions/checkout@v4
5255 - uses : pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
5356 - run : pnpm i
5457 - run : pnpm build
58+ - name : install rolldown
59+ if : ${{ matrix.rolldown }}
60+ run : |
61+ echo 'overrides: { vite: "npm:rolldown-vite@latest" }' >> pnpm-workspace.yaml
62+ pnpm i --no-frozen-lockfile
5563 - run : pnpm -C packages/plugin-rsc exec playwright install ${{ matrix.browser }}
5664 - run : pnpm -C packages/plugin-rsc test-e2e-ci --project=${{ matrix.browser }}
5765 env :
Original file line number Diff line number Diff line change @@ -36,19 +36,6 @@ export default defineConfig({
3636 } ,
3737 ] ,
3838 } ) ,
39- {
40- name : 'react-router-fixup' ,
41- transform ( code ) {
42- if ( code . includes ( `import { AsyncLocalStorage } from 'async_hooks';` ) ) {
43- code = code . replaceAll ( 'async_hooks' , 'node:async_hooks' )
44- code = code . replaceAll (
45- `global.___reactRouterServerStorage___` ,
46- `globalThis.___reactRouterServerStorage___` ,
47- )
48- return code
49- }
50- } ,
51- } ,
5239 ] ,
5340 environments : {
5441 client : {
@@ -61,12 +48,24 @@ export default defineConfig({
6148 include : [ 'react-router > cookie' , 'react-router > set-cookie-parser' ] ,
6249 exclude : [ 'react-router' ] ,
6350 } ,
51+ build : {
52+ rollupOptions : {
53+ // @ts -ignore rolldown
54+ platform : 'neutral' ,
55+ } ,
56+ } ,
6457 } ,
6558 rsc : {
6659 optimizeDeps : {
6760 include : [ 'react-router > cookie' , 'react-router > set-cookie-parser' ] ,
6861 exclude : [ 'react-router' ] ,
6962 } ,
63+ build : {
64+ rollupOptions : {
65+ // @ts -ignore rolldown
66+ platform : 'neutral' ,
67+ } ,
68+ } ,
7069 } ,
7170 } ,
7271} )
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import rsc from '@vitejs/plugin-rsc'
33import react from '@vitejs/plugin-react'
44import { defineConfig } from 'vite'
55
6- export default defineConfig ( ( _env ) => ( {
6+ export default defineConfig ( {
77 clearScreen : false ,
88 build : {
99 minify : false ,
@@ -31,6 +31,14 @@ export default defineConfig((_env) => ({
3131 rollupOptions : {
3232 // ensure `default` export only in cloudflare entry output
3333 preserveEntrySignatures : 'exports-only' ,
34+ // @ts -ignore rolldown
35+ platform : 'neutral' ,
36+ } ,
37+ } ,
38+ optimizeDeps : {
39+ // @ts -ignore rolldown
40+ rollupOptions : {
41+ platform : 'neutral' ,
3442 } ,
3543 } ,
3644 } ,
@@ -43,4 +51,4 @@ export default defineConfig((_env) => ({
4351 } ,
4452 } ,
4553 } ,
46- } ) )
54+ } )
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export default defineConfig({
2626 use : devices [ 'Desktop Safari' ] ,
2727 } ,
2828 ] ,
29+ workers : 1 ,
2930 forbidOnly : ! ! process . env . CI ,
3031 retries : process . env . CI ? 2 : 0 ,
3132 reporter : [ 'list' , process . env . CI && 'github' ]
You can’t perform that action at this time.
0 commit comments