File tree 4 files changed +33
-12
lines changed
4 files changed +33
-12
lines changed Original file line number Diff line number Diff line change @@ -121,9 +121,13 @@ jobs:
121
121
SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
122
122
123
123
e2e-react :
124
- name : E2E (react)
124
+ name : E2E (react-reload-${{ matrix.reload-on-shallow-false }} )
125
125
runs-on : ubuntu-22.04-arm
126
126
needs : [ci-core]
127
+ strategy :
128
+ fail-fast : false
129
+ matrix :
130
+ reload-on-shallow-false : [false, true]
127
131
steps :
128
132
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
129
133
- uses : pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
@@ -139,18 +143,19 @@ jobs:
139
143
TURBO_TOKEN : ${{ secrets.TURBO_TOKEN }}
140
144
TURBO_TEAM : ${{ secrets.TURBO_TEAM }}
141
145
E2E_NO_CACHE_ON_RERUN : ${{ github.run_attempt }}
146
+ RELOAD_ON_SHALLOW_FALSE : ${{ matrix.reload-on-shallow-false }}
142
147
- name : Save Cypress artifacts
143
148
uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
144
149
if : failure()
145
150
with :
146
151
path : packages/e2e/react/cypress/screenshots
147
- name : ci-react
152
+ name : ci-react-reload-${{ matrix.reload-on-shallow-false }}
148
153
- uses : 47ng/actions-slack-notify@main
149
154
name : Notify on Slack
150
155
if : failure()
151
156
with :
152
157
status : ${{ job.status }}
153
- jobName : react
158
+ jobName : react-reload-${{ matrix.reload-on-shallow-false }}
154
159
env :
155
160
SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
156
161
Original file line number Diff line number Diff line change @@ -8,7 +8,11 @@ enableHistorySync()
8
8
9
9
createRoot ( document . getElementById ( 'root' ) ! ) . render (
10
10
< StrictMode >
11
- < NuqsAdapter >
11
+ < NuqsAdapter
12
+ reloadPageOnShallowFalseUpdates = {
13
+ process . env . RELOAD_ON_SHALLOW_FALSE === 'true'
14
+ }
15
+ >
12
16
< RootLayout >
13
17
< Router />
14
18
</ RootLayout >
Original file line number Diff line number Diff line change 1
1
import react from '@vitejs/plugin-react'
2
- import { defineConfig } from 'vite'
2
+ import { defineConfig , loadEnv } from 'vite'
3
3
4
4
// https://vitejs.dev/config/
5
- export default defineConfig ( ( ) => ( {
6
- plugins : [ react ( ) ] ,
7
- build : {
8
- target : 'es2022' ,
9
- sourcemap : true
5
+ export default defineConfig ( ( { mode } ) => {
6
+ const env = loadEnv ( mode , process . cwd ( ) , '' )
7
+ return {
8
+ plugins : [ react ( ) ] ,
9
+ build : {
10
+ target : 'es2022' ,
11
+ sourcemap : true
12
+ } ,
13
+ define : {
14
+ 'process.env.RELOAD_ON_SHALLOW_FALSE' : JSON . stringify (
15
+ env . RELOAD_ON_SHALLOW_FALSE
16
+ )
17
+ }
10
18
}
11
- } ) )
19
+ } )
Original file line number Diff line number Diff line change 34
34
"e2e-react#build" : {
35
35
"outputs" : [" dist/**" , " cypress/**" ],
36
36
"dependsOn" : [" ^build" ],
37
- "env" : [" REACT_COMPILER" , " E2E_NO_CACHE_ON_RERUN" ]
37
+ "env" : [
38
+ " RELOAD_ON_SHALLOW_FALSE" ,
39
+ " REACT_COMPILER" ,
40
+ " E2E_NO_CACHE_ON_RERUN"
41
+ ]
38
42
},
39
43
"docs#build" : {
40
44
"outputs" : [" .next/**" , " !.next/cache/**" ],
You can’t perform that action at this time.
0 commit comments