Skip to content

Instantly share code, notes, and snippets.

@james2doyle
Last active January 15, 2022 21:38
Show Gist options
  • Save james2doyle/7e057758142982c2afad2eb9869ba3a3 to your computer and use it in GitHub Desktop.
Save james2doyle/7e057758142982c2afad2eb9869ba3a3 to your computer and use it in GitHub Desktop.
An example of using the tailwind config with typescript
// npm i -D @types/tailwindcss
import type { TailwindConfig } from 'tailwindcss/tailwind-config';
import type DefaultTheme from 'tailwindcss/defaultTheme';
type Tailwind = TailwindConfig & { theme: { extend: typeof DefaultTheme } };
export default {
darkMode: 'class',
content: [
'./components/**/*.{js,vue,ts}',
'./layouts/**/*.vue',
'./pages/**/*.vue',
'./plugins/**/*.{js,ts}',
'./nuxt.config.{js,ts}',
],
theme: {
extend: {},
},
plugins: [],
} as Tailwind;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment