forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Turbopack] place style imports in RSC in the client context (vercel#…
…69952) ### Why? Styles imported from RSC are processed twice by webpack loaders and postcss. This is not only expensive, but can also lead to hanging problems if both executions doesn't result in the same code (e. g. when using randomness in webpack loaders). ### What? Add a transition to styles to place them in the client context when import on RSC side. fixes vercel#69643 fixes PACK-3243
- Loading branch information
Showing
15 changed files
with
75 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 0 additions & 91 deletions
91
...s/next-core/src/next_client_reference/css_client_reference/css_client_reference_module.rs
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
...t-core/src/next_client_reference/css_client_reference/css_client_reference_module_type.rs
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
crates/next-core/src/next_client_reference/css_client_reference/css_client_reference_rule.rs
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
crates/next-core/src/next_client_reference/css_client_reference/mod.rs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ReactNode } from 'react' | ||
export default function Root({ children }: { children: ReactNode }) { | ||
return ( | ||
<html> | ||
<body>{children}</body> | ||
</html> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import dynamic from 'next/dynamic' | ||
|
||
const DynamicComponent = dynamic(() => import('../components/hello')) | ||
|
||
export default function Page() { | ||
return <DynamicComponent /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.hello { | ||
font-size: random(100) + px; | ||
color: rgb(0, 255, 0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import styles from './hello.module.scss' | ||
|
||
export default function Problem(props) { | ||
return <p className={styles.hello}>Hello World</p> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* @type {import('next').NextConfig} | ||
*/ | ||
const nextConfig = {} | ||
|
||
module.exports = nextConfig |
Oops, something went wrong.