Replies: 2 comments 2 replies
-
You may have followed outdated documentation. You shouldn't need a import { defineConfig } from 'vite';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
plugins: [
tailwindcss(),
],
}) With your entry @import "tailwindcss/index.css"; |
Beta Was this translation helpful? Give feedback.
-
@wongjn I'm kind of stuck with the setup as the custom styling doesn't work. the only way I can import tailwind in the app is by importing
The problem is that the custom styling also doesn't work. Do you have any recommendations on how to make it work? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to introduce tailwind in the project and use it in classes, but keep the existing scss.
I've followed the documentation, but tailwind doesn't get applied.
"sass": "^1.89.0",
"tailwindcss": "^4.1.7",
"autoprefixer": "^10.4.21",
"vite": "^5.4.12",
tailwind.config.js
/** @type {import('tailwindcss').Config} */ module.exports = { content: ['./index.html', './src/**/*.{js,ts,jsx,tsx,html}'], theme: { extend: {}, }, plugins: [], };
postcss.cofnig.js
module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, }, };
in src we have app.html that doesn't reference css, but in App.tsx we import './app.scss'
in app.scss
@tailwind base; @tailwind components; @tailwind utilities; ...
there is no visual change to the text. not sure what else to try.
Beta Was this translation helpful? Give feedback.
All reactions