Skip to content

Using Tailwind with Parcel Documentation #571

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

Closed
kalaschnik opened this issue Oct 21, 2020 · 2 comments
Closed

Using Tailwind with Parcel Documentation #571

kalaschnik opened this issue Oct 21, 2020 · 2 comments

Comments

@kalaschnik
Copy link

There is a variety of different How to Use Tailwind in Parcel on the web, and as there is no official documentation of how to do it, I would like to hear from others whats the recommended setup is.

Key takeaways I observed/experienced:

  • some users install Tailwind as dependency while others install it as devDependency, what’s the “correct” way?
  • Tailwind prefers .postcssrc.json, which is required to use Tailwind’s cache(?)
  • I can name my main style file either css or pcss, and Parcel seems to be fine with both

Right now my config looks like this:
.postcssrc.json

{
  "plugins": ["tailwindcss"]
}

package.json (excerpt)

"scripts": {
  "dev": "parcel serve ./src/index.html",
  "build": "parcel build ./src/index.html --public-url='./'"
},
"dependencies": {
  "tailwindcss": "^1.9.5"
},
"devDependencies": {
  "parcel": "^2.0.0-beta.1",
  "postcss-modules": "^3.2.2"
}

I would love to hear your advice how you setup Parcel & Tailwind!
Thanks!

@adamwathan
Copy link
Member

@simonswiss This would be a good one to write an integration guide for 👍🏻

@adamwathan
Copy link
Member

I've captured this in our internal integration guides roadmap so going to close 👍🏻 Will put this together and publish it next time we work on that project (probably late February).

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

No branches or pull requests

2 participants