primefaces / tailwindcss-primeui

Tailwind CSS Utilities for Prime UI Libraries
MIT License
7 stars 0 forks source link

Is this plugin compatible for ES6 or Typescript support ? #1

Open adiramardiani opened 2 months ago

adiramardiani commented 2 months ago

First congrats for release this plugin.

I don't know this is ES6 (because this is project requirement), nuxt or typescript issue, but I try to use your plugin on latest nuxt release I'm using nuxt-tailwind module, and the config on tailwind.config.ts, here my script :

import type { Config } from 'tailwindcss';
import primeUi from 'tailwindcss-primeui';

export default <Partial<Config>>{
  content: ['./shareds/**/*.{js,vue,ts}', 'presets/**/*.{js,vue,ts}'],
  plugins: [primeUi]
};

But give me error image

Is my implementation is wrong ?

hywax commented 1 month ago

There are currently no declared types in this package. To remove the error, I do the following:

import type { Config } from 'tailwindcss'
// @ts-expect-error no declared types at this time
import primeui from 'tailwindcss-primeui'

export default <Partial<Config>>{
  darkMode: 'class',
  corePlugins: {
    preflight: false,
  },
  plugins: [primeui],
}

Solution is temporary, when the types show up, then I'll just delete the comment