Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for Preprocessors #870

Merged
merged 5 commits into from
Feb 23, 2022
Merged

Conversation

depsimon
Copy link
Contributor

Add -D flag for dev dependencies.
Prevent error with require() in postcss.config.js cfr this issue

Add `-D` flag for dev dependencies.
Prevent error with `require()` in `postcss.config.js` cfr [this issue](vercel/next.js#10117)
@vercel
Copy link

vercel bot commented Jun 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tailwindlabs/tailwindcss-com/GhRHqgbXZ5mo6QKXdiynCagLxqhd
✅ Preview: https://tailwindcss-com-git-fork-depsimon-patch-1-tailwindlabs.vercel.app

@@ -130,10 +130,10 @@ It's included directly in the `tailwindcss` package itself, so to use it all you
// postcss.config.js
module.exports = {
plugins: [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be object plugins: {}

@simonswiss
Copy link
Contributor

Better late than never - thanks for that 👍

I've updated the arrays to be objects instead to conform to the new format.

@simonswiss simonswiss merged commit cefb51d into tailwindlabs:master Feb 23, 2022
jtoar pushed a commit to redwoodjs/redwood that referenced this pull request Jul 24, 2023
I recently setup a new RW project with Tailwind and noticed a few
improvements I thought could be made

First I wanted our setup to as closely as possible follow the latest
instructions on https://tailwindcss.com/docs/installation/using-postcss
Mainly that meant to use `@tailwind base;` etc instead of `@import ...`

Unfortunately (?) I couldn't use their postcss config syntax, because
they're using Next-specific syntax
tailwindlabs/tailwindcss.com#870 TW PR that
updated their docs
vercel/next.js#10117 Next issue about the
syntax with some good info in the comments, including motivation on why
they use this non-standard syntax

Secondly I got syntax warnings in my css files after setting up
Tailwind. After some googling I fixed that by installing the VS Code
Tailwind intellisense extension. Looking at our code I then realized we
do add that extension to the list of recommended extensions in the
user's project. But we never actually tell the user to install it. I
should have looked at all the files the setup command modified, but even
if I had, I probably wouldn't have realized that was one of the plugins
that we recommend, because the plugin ID doesn't match the name of the
plugin (the ID is `bradlc.vscode-tailwindcss`)

This is the first warning I spotted (`Unknown at rule @tailwind
css(unknownAtRules)`)

![image](https://github.com/redwoodjs/redwood/assets/30793/bfe13012-dc9d-437f-9f5a-6807c9a52337)

This is what it looks like when running the setup command after my
changes:

![image](https://github.com/redwoodjs/redwood/assets/30793/3eff2c9f-4375-4a7b-8466-379b8c9e8fc2)

---

@jtoar 
* I selected the v6 milestone, but this totally doesn't have to go out
in an RC. It can wait for v6.1 or whatever. It's non-breaking, but you
decide when you want to release it.
* For the upgrade guide we could suggest people switch to the
declaration syntax instead of imports. But the imports still seem to
work, so we could also just skip it.
jtoar pushed a commit to redwoodjs/redwood that referenced this pull request Jul 26, 2023
I recently setup a new RW project with Tailwind and noticed a few
improvements I thought could be made

First I wanted our setup to as closely as possible follow the latest
instructions on https://tailwindcss.com/docs/installation/using-postcss
Mainly that meant to use `@tailwind base;` etc instead of `@import ...`

Unfortunately (?) I couldn't use their postcss config syntax, because
they're using Next-specific syntax
tailwindlabs/tailwindcss.com#870 TW PR that
updated their docs
vercel/next.js#10117 Next issue about the
syntax with some good info in the comments, including motivation on why
they use this non-standard syntax

Secondly I got syntax warnings in my css files after setting up
Tailwind. After some googling I fixed that by installing the VS Code
Tailwind intellisense extension. Looking at our code I then realized we
do add that extension to the list of recommended extensions in the
user's project. But we never actually tell the user to install it. I
should have looked at all the files the setup command modified, but even
if I had, I probably wouldn't have realized that was one of the plugins
that we recommend, because the plugin ID doesn't match the name of the
plugin (the ID is `bradlc.vscode-tailwindcss`)

This is the first warning I spotted (`Unknown at rule @tailwind
css(unknownAtRules)`)

![image](https://github.com/redwoodjs/redwood/assets/30793/bfe13012-dc9d-437f-9f5a-6807c9a52337)

This is what it looks like when running the setup command after my
changes:

![image](https://github.com/redwoodjs/redwood/assets/30793/3eff2c9f-4375-4a7b-8466-379b8c9e8fc2)

---

@jtoar 
* I selected the v6 milestone, but this totally doesn't have to go out
in an RC. It can wait for v6.1 or whatever. It's non-breaking, but you
decide when you want to release it.
* For the upgrade guide we could suggest people switch to the
declaration syntax instead of imports. But the imports still seem to
work, so we could also just skip it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants