loteoo/hyperstatic

How to efficiently use Tailwind?

hlibco opened this issue · 1 comments

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?

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