Skip to content

Commit

Permalink
fix(examples): correct tailwind editor support (vercel#3438)
Browse files Browse the repository at this point in the history
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
tknickman authored Jan 23, 2023
1 parent 01557f3 commit 4eb66af
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
6 changes: 1 addition & 5 deletions examples/with-tailwind/apps/docs/postcss.config.js
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: {},
},
};
3 changes: 3 additions & 0 deletions examples/with-tailwind/apps/docs/tailwind.config.js
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");
6 changes: 1 addition & 5 deletions examples/with-tailwind/apps/web/postcss.config.js
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: {},
},
};
3 changes: 3 additions & 0 deletions examples/with-tailwind/apps/web/tailwind.config.js
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");
4 changes: 2 additions & 2 deletions examples/with-tailwind/packages/ui/tailwind.config.js
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");

0 comments on commit 4eb66af

Please sign in to comment.