Last active
January 15, 2022 21:38
-
-
Save james2doyle/7e057758142982c2afad2eb9869ba3a3 to your computer and use it in GitHub Desktop.
An example of using the tailwind config with typescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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