You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when I tried to use the following utility, I converted my tailwind.config.js to .ts to get better intellisense
import tailwindConfig from 'tailwind-config'
import resolveConfig from 'tailwindcss/resolveConfig'
const twFullConfig = resolveConfig(tailwindConfig)
// twFullConfig.theme.colors.dark[100] // 🗸
But then I started receiving strange errors and it's rather confusing
This doesn't work
// tailwind.config.ts
import { themeVariants } from 'tailwindcss-theme-variants'
import { type Config } from 'tailwindcss'
// The inferred type of 'twConfig' cannot be named without a reference to 'tailwindcss-theme-variants/node_modules/tailwindcss/types/config'. This is likely not portable. A type annotation is necessary.ts(2742)
const config = { /* ... */ } as const satisfies Config
export default config
This works
const config: Config = { /* ... */ }
Which finally led me to this error
$ tsc tailwind.config.ts
../../node_modules/tailwindcss-theme-variants/index.d.ts:1:40 - error TS2307: Cannot find module './types' or its corresponding type declarations.
1: import type { ThisPluginOptions } from "./types";
And when I look in the module, there is really no such folder.
The text was updated successfully, but these errors were encountered:
Hi, when I tried to use the following utility, I converted my
tailwind.config.js
to.ts
to get better intellisenseBut then I started receiving strange errors and it's rather confusing
This doesn't work
This works
Which finally led me to this error
And when I look in the module, there is really no such folder.
The text was updated successfully, but these errors were encountered: