NagariaHussain / doppio

A Frappe app (CLI) to magically setup single page applications and Vue/React powered desk pages on your custom Frappe apps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tailwind css + React.js: tailwind config doesn't include the template paths in content

IMS94 opened this issue · comments

When we create an SPA with react and tailwind enabled, following is the tailwind.config.ts file being created.

/** @type {import('tailwindcss').Config} */
export default {
  content: [],
  theme: {
    extend: {},
  },
  plugins: [],
}

Note that the content is an empty array. But it should be:

/** @type {import('tailwindcss').Config} */
export default {
  content: [
    "./src/**/*.{js,jsx,ts,tsx}"
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

Note the "./src/**/*.{js,jsx,ts,tsx}" content (template paths)

Hey! Feel free to raise a PR or I will fix it soon.

Looks like the default config generated by tailwindCSS CLI is being used. I don't know what would be the right approach here, any thoughts @nikkothari22 ?

@NagariaHussain I see. My experience is that, until I add the above into the content, CSS didn't get applied. May be we can mention that in the readme?

👍 Yeah, until we have better way, let's add it to README.