thomasjohnkane / tailwind-alpine-chrome-extension

Starter Kit for building a Web Extension with Tailwindcss & AlpineJS
203 stars 27 forks source link

Using `@apply` in `index.css` #9

Open Olshansk opened 3 years ago

Olshansk commented 3 years ago

I wanted to use the @apply directive (https://tailwindcss.com/docs/functions-and-directives) to create a helper utility class for my app. After some debugging, I discovered that this definition has to go in src/tailwind.css as opposed to one of the index.css files

I looked at the configs in webpack.config.js and the scripts in package.json and understand why it's the case but was wondering if there's a clean and idiomatic approach to achieve this?

Upon trying to change the order in which the files are watched and post-processed, the code got a bit ugly relative to how it is right now and was wondering if anyone else has any ideas or suggestions?