-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Experimental Modern Mode with CSS (#10289)
- Loading branch information
Showing
9 changed files
with
242 additions
and
1 deletion.
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
9 changes: 9 additions & 0 deletions
9
test/integration/css-fixtures/multi-module-modern/next.config.js
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,9 @@ | ||
const parent = require('../next.config') | ||
|
||
module.exports = { | ||
...parent, | ||
experimental: { | ||
...parent.experimental, | ||
modern: true, | ||
}, | ||
} |
20 changes: 20 additions & 0 deletions
20
test/integration/css-fixtures/multi-module-modern/pages/blue.js
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,20 @@ | ||
import Link from 'next/link' | ||
import { blueText } from './blue.module.css' | ||
|
||
export default function Blue() { | ||
return ( | ||
<> | ||
<div id="verify-blue" className={blueText}> | ||
This text should be blue. | ||
</div> | ||
<br /> | ||
<Link href="/red" prefetch> | ||
<a id="link-red">Red</a> | ||
</Link> | ||
<br /> | ||
<Link href="/none" prefetch={false}> | ||
<a id="link-none">None</a> | ||
</Link> | ||
</> | ||
) | ||
} |
3 changes: 3 additions & 0 deletions
3
test/integration/css-fixtures/multi-module-modern/pages/blue.module.css
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,3 @@ | ||
.blueText { | ||
color: blue; | ||
} |
19 changes: 19 additions & 0 deletions
19
test/integration/css-fixtures/multi-module-modern/pages/none.js
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,19 @@ | ||
import Link from 'next/link' | ||
|
||
export default function None() { | ||
return ( | ||
<> | ||
<div id="verify-black" style={{ color: 'black' }}> | ||
This text should be black. | ||
</div> | ||
<br /> | ||
<Link href="/red" prefetch={false}> | ||
<a id="link-red">Red</a> | ||
</Link> | ||
<br /> | ||
<Link href="/blue" prefetch={false}> | ||
<a id="link-blue">Blue</a> | ||
</Link> | ||
</> | ||
) | ||
} |
20 changes: 20 additions & 0 deletions
20
test/integration/css-fixtures/multi-module-modern/pages/red.js
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,20 @@ | ||
import Link from 'next/link' | ||
import { redText } from './red.module.css' | ||
|
||
export default function Red() { | ||
return ( | ||
<> | ||
<div id="verify-red" className={redText}> | ||
This text should be red. | ||
</div> | ||
<br /> | ||
<Link href="/blue" prefetch={false}> | ||
<a id="link-blue">Blue</a> | ||
</Link> | ||
<br /> | ||
<Link href="/none" prefetch={false}> | ||
<a id="link-none">None</a> | ||
</Link> | ||
</> | ||
) | ||
} |
3 changes: 3 additions & 0 deletions
3
test/integration/css-fixtures/multi-module-modern/pages/red.module.css
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,3 @@ | ||
.redText { | ||
color: red; | ||
} |
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,9 @@ | ||
const parent = require('../next.config') | ||
|
||
module.exports = { | ||
...parent, | ||
experimental: { | ||
...parent.experimental, | ||
modern: false, | ||
}, | ||
} |