tailwindlabs / tailwindcss-forms

A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.
https://tailwindcss-forms.vercel.app
MIT License
4.22k stars 223 forks source link

Outdated installation instructions #138

Closed SylvainGarrigues closed 1 year ago

SylvainGarrigues commented 1 year ago

What version of @tailwindcss/forms are you using?

N/A

What version of Node.js are you using?

N/A

What browser are you using?

N/A

What operating system are you using?

N/A

Reproduction repository

N/A

Describe your issue

tailwind initialization script now produces ESM config files, and require('@tailwindcss/forms') is no longer possible: see code below provided in the README.md:

// tailwind.config.js
module.exports = {
  theme: {
    // ...
  },
  plugins: [
    require('@tailwindcss/forms'),
    // ...
  ],
}
adamwathan commented 1 year ago

Hey! You can absolutely still use require in an ESM config file, here's a demo project where it all works as expected:

https://github.com/adamwathan/sveltekit-forms-esm-demo

Not planning to update the instructions to show every possible combination of file formats or imports I don't think, just too messy and impractical.