-
Notifications
You must be signed in to change notification settings - Fork 26k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Global CSS Support * Fix webpack configuration * oneOf rule isn't necessary yet * Adjust CSS chunk naming * Begin testing CSS behavior * Add another test TODO * Replace null-loader with ignore-loader * Turn on chunks for new CSS feature * Fix multi test suite * Test CSS import order * Test style HMR * Test CSS compilation * Test compilation and prefixing together * Verify CSS styling works for Development and Production * Add missing TODO * Remove unnecessary test * Adjust TODO message * Hide page until React hydrates * Revert "Hide page until React hydrates" This reverts commit 898d4e0. * Hide FOUC during development * Test CSS imports * Update tests TODO * Add fixture for url() test * Test `file-loader` support in CSS files * Use a simple variant of cssnano * Self-import * Undo bundling * Implement suggestion
- Loading branch information
Showing
51 changed files
with
1,383 additions
and
8 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
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
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
12 changes: 12 additions & 0 deletions
12
test/integration/css/fixtures/compilation-and-prefixing/pages/_app.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,12 @@ | ||
import React from 'react' | ||
import App from 'next/app' | ||
import '../styles/global.css' | ||
|
||
class MyApp extends App { | ||
render () { | ||
const { Component, pageProps } = this.props | ||
return <Component {...pageProps} /> | ||
} | ||
} | ||
|
||
export default MyApp |
3 changes: 3 additions & 0 deletions
3
test/integration/css/fixtures/compilation-and-prefixing/pages/index.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,3 @@ | ||
export default function Home () { | ||
return <div className='red-text'>This text should be red.</div> | ||
} |
5 changes: 5 additions & 0 deletions
5
test/integration/css/fixtures/compilation-and-prefixing/styles/global.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,5 @@ | ||
@media (480px <= width < 768px) { | ||
::placeholder { | ||
color: green; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
test/integration/css/fixtures/invalid-global-with-app/pages/_app.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,11 @@ | ||
import React from 'react' | ||
import App from 'next/app' | ||
|
||
class MyApp extends App { | ||
render () { | ||
const { Component, pageProps } = this.props | ||
return <Component {...pageProps} /> | ||
} | ||
} | ||
|
||
export default MyApp |
5 changes: 5 additions & 0 deletions
5
test/integration/css/fixtures/invalid-global-with-app/pages/index.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,5 @@ | ||
import '../styles/global.css' | ||
|
||
export default function Home () { | ||
return <div className='red-text'>This text should be red.</div> | ||
} |
3 changes: 3 additions & 0 deletions
3
test/integration/css/fixtures/invalid-global-with-app/styles/global.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 @@ | ||
.red-text { | ||
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,5 @@ | ||
import '../styles/global.css' | ||
|
||
export default function Home () { | ||
return <div className='red-text'>This text should be red.</div> | ||
} |
3 changes: 3 additions & 0 deletions
3
test/integration/css/fixtures/invalid-global/styles/global.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 @@ | ||
.red-text { | ||
color: red; | ||
} |
13 changes: 13 additions & 0 deletions
13
test/integration/css/fixtures/multi-global-reversed/pages/_app.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,13 @@ | ||
import React from 'react' | ||
import App from 'next/app' | ||
import '../styles/global2.css' | ||
import '../styles/global1.css' | ||
|
||
class MyApp extends App { | ||
render () { | ||
const { Component, pageProps } = this.props | ||
return <Component {...pageProps} /> | ||
} | ||
} | ||
|
||
export default MyApp |
3 changes: 3 additions & 0 deletions
3
test/integration/css/fixtures/multi-global-reversed/pages/index.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,3 @@ | ||
export default function Home () { | ||
return <div className='red-text'>This text should be red.</div> | ||
} |
3 changes: 3 additions & 0 deletions
3
test/integration/css/fixtures/multi-global-reversed/styles/global1.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 @@ | ||
.red-text { | ||
color: red; | ||
} |
3 changes: 3 additions & 0 deletions
3
test/integration/css/fixtures/multi-global-reversed/styles/global2.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 @@ | ||
.blue-text { | ||
color: blue; | ||
} |
Oops, something went wrong.