#issues with tailwindcss and next

16 messages · Page 1 of 1 (latest)

ornate sundial
#

Hi, i've just start learning next and i want to add tailwindcss to it, but when i create a project following the doc to do it, next is working well but tailwind is just not loading, how can i fix it ?

#

i don't really know what code can i send to help

slow dock
#

did you add these to your globals.css ?

@tailwind base;
@tailwind components;
@tailwind utilities;
ornate sundial
#

yep

slow dock
#

do you have a tailwind.config.js?

ornate sundial
#

yup

#

do u want it ?

slow dock
#

yes could help

ornate sundial
#

what can i do to help ?

#

ok thanks a lot

#
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    './pages/**/*.{js,ts,jsx,tsx}',
    './components/**/*.{js,ts,jsx,tsx}',
    './app/**/*.{js,ts,jsx,tsx}',
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}
#

that's it

slow dock
#

are you using the src directory?

ornate sundial
#

yeah

slow dock
#

add this in the content array

#
'./src/**/*.{js,ts,jsx,tsx}',