Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type errors when using in tailwind.config.mjs #94

Open
joeldbirch opened this issue May 2, 2023 · 1 comment
Open

Type errors when using in tailwind.config.mjs #94

joeldbirch opened this issue May 2, 2023 · 1 comment

Comments

@joeldbirch
Copy link

Hello, nice looking plugin, thank you!

I'm getting errors when attempting to add this plugin to my tailwind.config.mjs file. I assume it's something incompatible with the CommonJS format of the imported file.

// @ts-check
import opentype from 'tailwindcss-opentype'

// ...
{
  // ... rest of config here

  plugins: [
    opentype
  ]
}

The error is:

Type 'typeof import("/some/path/node_modules/tailwindcss-opentype/dist/index")' is not assignable to type 'PluginCreator | { handler: PluginCreator; config?: Partial<Config>; } | { (options: any): { handler: PluginCreator; config?: Partial<...>; }; __isOptionsFunction: true; }'.ts(2322)
@stormwarning
Copy link
Owner

stormwarning commented May 4, 2023

@joeldbirch Thanks, nice to know someone else finds it useful!

I didn't realise Tailwind allowed JS module config formats now, I'll look into this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants