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

How to efficiently use Tailwind? #33

Open
hlibco opened this issue May 15, 2021 · 1 comment
Open

How to efficiently use Tailwind? #33

hlibco opened this issue May 15, 2021 · 1 comment

Comments

@hlibco
Copy link

hlibco commented May 15, 2021

After configuring Tailwind in a project created with hyperapp-starter I noticed 2 things:

  1. Autoreload has a delay of ~1.5s
  2. Couldn't use Tailwind classes globally, such as <div class="text-gray-500">Hello</div>, but instead, had to use them like:
import base from '/src/styles/base.css'

export default () => (
  <div class={base['text-gray-500']}>Hello</div>
)

Is there a recommended way to use/configure Tailwind with hyperstatic?

@loteoo
Copy link
Owner

loteoo commented May 15, 2021

Hi! Hyperstatic is bundler agnostic, the current hyperstatic-starter uses vite for dev tooling, so it probably has to do with the vite.config.js. I would suggest to try removing these lines from your project and try again: https://github.com/loteoo/hyperstatic-starter/blob/master/vite.config.js#L6-L10

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