forked from vercel/turborepo
-
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.
fix(examples): correct tailwind editor support (vercel#3438)
Thanks @gaspar09 for the identification and fix here. We were getting a little too fancy for our own good I think. Passing the config right to postcss works, but you lose all the editor niceties. Creating an empty tailwind config that re exports our shared config get's full editor support.
- Loading branch information
Showing
5 changed files
with
10 additions
and
12 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 |
---|---|---|
@@ -1,13 +1,9 @@ | ||
// If you want to use other PostCSS plugins, see the following: | ||
// https://tailwindcss.com/docs/using-with-preprocessors | ||
|
||
const config = require("tailwind-config/tailwind.config.js"); | ||
|
||
module.exports = { | ||
plugins: { | ||
// Specifying the config is not necessary in most cases, but it is included | ||
// here to share the same config across the entire monorepo | ||
tailwindcss: { config }, | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
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 @@ | ||
// tailwind config is required for editor support | ||
|
||
module.exports = require("tailwind-config/tailwind.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 |
---|---|---|
@@ -1,13 +1,9 @@ | ||
// If you want to use other PostCSS plugins, see the following: | ||
// https://tailwindcss.com/docs/using-with-preprocessors | ||
|
||
const config = require("tailwind-config/tailwind.config.js"); | ||
|
||
module.exports = { | ||
plugins: { | ||
// Specifying the config is not necessary in most cases, but it is included | ||
// here to share the same config across the entire monorepo | ||
tailwindcss: { config }, | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
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 @@ | ||
// tailwind config is required for editor support | ||
|
||
module.exports = require("tailwind-config/tailwind.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const config = require("tailwind-config/tailwind.config.js"); | ||
// tailwind config is required for editor support | ||
|
||
module.exports = config; | ||
module.exports = require("tailwind-config/tailwind.config.js"); |