-
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.
https://nystudio107.com/blog/speeding-up-tailwind-css-builds tailwindlabs/tailwindcss#2820 Basically, the splits the CSS up into a bunch of separate files so that Webpack only has to rebuild the *whole* tailwind thing rarely. HMR reloading when the site is served is much faster!
- Loading branch information
1 parent
d1675ef
commit fd8b862
Showing
10 changed files
with
69 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* This injects Tailwind's base styles, which is a combination of | ||
* Normalize.css and some additional base styles. | ||
*/ | ||
@import 'tailwindcss/base'; | ||
|
||
/** | ||
* Here we add custom base styles, applied after the tailwind-base | ||
* classes | ||
* | ||
*/ |
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,22 @@ | ||
/** | ||
* This injects any component classes registered by plugins. | ||
* | ||
*/ | ||
@import 'tailwindcss/components'; | ||
|
||
/** | ||
* Here we add custom component classes; stuff we want loaded | ||
* *before* the utilities so that the utilities can still | ||
* override them. | ||
* | ||
*/ | ||
|
||
/** | ||
* This is CSS used for high-level layouts. | ||
*/ | ||
@import "layouts/app.pcss"; | ||
|
||
/** | ||
* Our own components. | ||
*/ | ||
@import "components/image.pcss"; |
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 @@ | ||
img { | ||
border: 2px solid greenyellow; | ||
} |
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 @@ | ||
/** | ||
* This rigamarole is to so that we can import these as modules webpack | ||
* will recognize, leading to faster rebuilds that don't get bogged down by | ||
* Tailwind. | ||
*/ | ||
|
||
import './base.pcss' | ||
import './components.pcss' | ||
import './utilities.pcss' |
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 @@ | ||
body { | ||
background-color: aquamarine; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* This injects all of Tailwind's utility classes, generated based on your | ||
* config file. | ||
* | ||
*/ | ||
@import 'tailwindcss/utilities'; | ||
|
||
/** | ||
* Include vendor css. | ||
* | ||
*/ | ||
@import 'vendor.pcss'; |
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 @@ | ||
/** | ||
* Any files from external packages that are very unlikely to change. | ||
*/ |
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