I am working in react with typescript and tailwindcss.
What I want is that instead of using @apply directive in main tailwind.css file (the file which conatins @tailwind base, @tailwind components, etc), I want to use it in any .scss file.
For example, in react whenever I create a component, I create a folder and an inside it I create a index.tsx file and a .scss file. I want to use @apply directive in that .scss file. In this way, it will be easy to work and debug because both the associated files will be inside the same folder. How can I achieve that ??
I have shown my basic folder structure below.
Folder structure:
src > components > Header > Header.tsx
import React from "react";
import styles from "./Header.module.scss";
interface Props {}
const Header: React.FC<Props> = (props) => {
return <div className={styles.headerTag}>Header part here</div>;
};
export default Header;
src > components > Header > Header.module.scss
// what to import so that I can use tailwind like this
.headerTag {
@apply text-8xl font-bold bg-gray-500;
}