# Using @apply with Tailwind 2 + Sage 9 takes over 20s to compile scss file

**URL:** https://discourse.roots.io/t/using-apply-with-tailwind-2-sage-9-takes-over-20s-to-compile-scss-file/20849
**Category:** sage
**Tags:** webpack, sage9
**Created:** 2021-05-27T09:11:52Z
**Posts:** 2

## Post 1 by @samfrank — 2021-05-27T09:11:52Z

Hey there,

I am using sage 9 with tailwind css on sage 9 with the `postcss7-compat` tailwind package. Everything is generally running fine, I have used some of the tutorials that people have posted like this [one](https://github.com/tailwindlabs/tailwindcss/discussions/2941) and [this one](https://discourse.roots.io/t/tailwind-v2-and-sage-9/19598)

When putting the tailwind class in the inline classes it is super quick (eg `<div class="flex">`) but when I use the `@apply` in an .scss and then include that in the `main.scss` file I start to get huge compile time, over 20secs plus which is on a fresh install with very minimal scss code in there.

Has any one had a problem that sounds similar to this?

My thoughts are that it is because I am using the postcss7 compat (as I want to use tailwind2 in sage 9) but I cannot be sure. Webpack config is not a strong point

---

## Post 2 by @strarsis — 2021-05-27T12:45:29Z

Related / solution:

> [@Sage "9.1": Please test](https://discourse.roots.io/t/sage-9-1-please-test/20067/32):
>
> For tailwind the devs apparently were able to solve the long build time by using a modified library ([https://www.npmjs.com/package/@tailwindcss/jit](https://www.npmjs.com/package/@tailwindcss/jit)). Node-sass has been deprecated in favor of Dart sass, which is now the reference implementation. However, uncompiled, JavaScript Dart sass seems to be slower than a compiled binary (from what I read). So maybe this is the underlying reason?
