Link to the code that reproduces this issue
https://github.com/GuillaumeHalb/nextjs-parallel-routes-style-issue
To Reproduce
Build the app with yarn and yarn build
Start in production mode with yarn start
go to page http://localhost:3000/offres/whatever
click on offers
See text "Expected red text" in black.
Refresh the current page and see that style has changed.
Current vs. Expected behavior
I want the style to be loaded at first without needing to refresh the page.
Verify canary release
Provide environment information
Platform: mac os 12.6.2
node: v20.9.0
npm: 10.1.0
yarn: 1.22.19
next: 14.0.3
eslint-config-next: 14.0.1
react: 18.2.0
react-dom: 18.2.0
typescript: 5.2.2
output: "standalone",
Which area(s) are affected? (Select all that apply)
App Router
Additional context
The issue happens when:
- There is a parallel route (in my case
app/@modal/offres/[id]/page.tsx)
- I need to use search params on route
app/offres/page.tsx. As soon as I call something like searchParams.field style is not loaded.
- I navigate from
app/offres/[id]/page.tsx to app/offres/page.tsx with next link.
I feel like the css file of app/offres/page.tsx is not loaded.
No response
Link to the code that reproduces this issue
https://github.com/GuillaumeHalb/nextjs-parallel-routes-style-issue
To Reproduce
Current vs. Expected behavior
I want the style to be loaded at first without needing to refresh the page.
Verify canary release
Provide environment information
Platform: mac os 12.6.2 node: v20.9.0 npm: 10.1.0 yarn: 1.22.19 next: 14.0.3 eslint-config-next: 14.0.1 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 output: "standalone",Which area(s) are affected? (Select all that apply)
App Router
Additional context
The issue happens when:
app/@modal/offres/[id]/page.tsx)app/offres/page.tsx. As soon as I call something likesearchParams.fieldstyle is not loaded.app/offres/[id]/page.tsxtoapp/offres/page.tsxwith next link.I feel like the css file of
app/offres/page.tsxis not loaded.No response