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

Plugin not applied in Node.js 22.12 #172

Closed
hyunbinseo opened this issue Dec 15, 2024 · 1 comment
Closed

Plugin not applied in Node.js 22.12 #172

hyunbinseo opened this issue Dec 15, 2024 · 1 comment

Comments

@hyunbinseo
Copy link
Contributor

hyunbinseo commented Dec 15, 2024

What version of @tailwindcss/forms are you using?

0.5.9

What version of Node.js are you using?

v22.12.0

What browser are you using?

Firefox

What operating system are you using?

macOS

Reproduction repository

https://github.com/hyunbinseo/tailwindcss-forms-172

Describe your issue

Important

Must use Node.js v22.12+ with a JS config file.

This works:

node --run dev
// tailwind.config.js

import forms from '@tailwindcss/forms';

/** @type {import('tailwindcss').Config} */
export default {
  content: ['./src/**/*.{html,js,svelte,ts}'],
  theme: {
    extend: {}
  },
  plugins: [forms]
};

This does not:

rm -rf .svelte-kit && node --run dev
// tailwind.config.js

import forms from '@tailwindcss/forms';
import plugin from 'tailwindcss/plugin';

/** @type {import('tailwindcss').Config} */
export default {
  content: ['./src/**/*.{html,js,svelte,ts}'],
  theme: {
    extend: {}
  },
  plugins: [forms, plugin(() => ({}))]
};

Downgrading to Node.js v22.11.0 works, so it is possibly related to require(esm) is now enabled by default.

Workaround

Use the tailwind.config.ts filename instead.

@hyunbinseo
Copy link
Contributor Author

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