CodeKit
CodeKit copied to clipboard
Add explicit "require" info in the generated tailwind.config.js plugins comment
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!