tailwind css - Kan ikke bruke tilpasset tema med daisyUI og TailwindCSS i et Typescript-prosjekt
Jeg klarer ikke å bruke tilpasset tema for daisyUI med TailwindCSS. Jeg lette etter eksempler, men fant bare JS-eksempler.
Jeg prøvde:
import type { Config } from "tailwindcss";
export default {
content: ["./app/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {
daisyui: {
themes: [
{
'devytheme': {
'primary': '#84cc16',
'secondary': '#8f4263',
'accent': '#5c7f67',
'neutral': '#291e00',
'base-100': '#e9e7e7',
'info': '#3abff8',
'success': '#36d399',
'warning': '#fbbd23',
'error': '#f87272',
},
}
],
theme: 'devytheme',
},
},
},
plugins: [require("daisyui")],
} satisfies Config;
Og litt mer variasjon for eksempel dette:
import type { Config } from "tailwindcss";
const config: Config = {
content: ["./app/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {
daisyui: {
themes: {
'devytheme': {
'primary': '#84cc16',
'secondary': '#8f4263',
'accent': '#5c7f67',
'neutral': '#291e00',
'base-100': '#e9e7e7',
'info': '#3abff8',
'success': '#36d399',
'warning': '#fbbd23',
'error': '#f87272',
},
},
},
},
},
plugins: [require("daisyui")],
} satisfies Config;
Når koden ikke fungerer, får jeg følgende feil, og ingen stiler blir brukt på appen.
warn - No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration.
warn - https://tailwindcss.com/docs/content-configuration
Original tailwind.config.ts var som følger:
import type { Config } from "tailwindcss";
export default {
content: ["./app/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
plugins: [require("daisyui")],
} satisfies Config;
Enhver hjelp vil være flott. Det er en Remix-app som ble startet ved å bruke BlueStacks.