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

Add explicit "require" info in the generated tailwind.config.js plugins comment #670

Open
destructobeam opened this issue Oct 2, 2021 · 0 comments

Comments

@destructobeam
Copy link

When using function values for configuring TailwindCSS plugins, string references in the plugins array fail to compile, e.g.

With the following config:

module.exports = {
  // ...
  theme: {
    extend: {
      typography: (theme) => ({
        // ...
      })
    }
  }
  // ...
};

Plugins referenced like this do not work:

{
  plugins: ['@tailwindcss/typography']
}

Plugins required like this do work:

{
  plugins: [require('@tailwindcss/typography')]
}

Comment where mentioning the needed require could help:

//
// If you want to run any Tailwind plugins (such as 'tailwindcss-typography'), simply install those into the Project via the
// Packages area in CodeKit, then pass their names (and, optionally, any configuration values) here.
// Full file paths are not necessary; CodeKit will find them.
//

Thanks Bryan!

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

1 participant