tailwindcss-custom-forms icon indicating copy to clipboard operation
tailwindcss-custom-forms copied to clipboard

Issue when upgrading to TW v2

Open usernotnull opened this issue 4 years ago • 7 comments

After upgrading to Tailwind v2 (with postcss7 compat), requiring this plugin in my tailwind.config.js throws the following error on npm run:

Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
TypeError: value.charCodeAt is not a function at

At this line in my scss: @tailwind components;

Is this plugin ready for the tailwind upgrade yet or might it be another issue from my side?

usernotnull avatar Nov 19 '20 08:11 usernotnull

I think they recommend https://github.com/tailwindlabs/tailwindcss-forms for v2

ghost avatar Nov 19 '20 10:11 ghost

Probably time to mark this project as abandoned with a link in the description to the new tailwind forms

usernotnull avatar Nov 19 '20 19:11 usernotnull

How do we use the new one while keeping the same styles

deantheiceman avatar Nov 20 '20 01:11 deantheiceman

I think they recommend https://github.com/tailwindlabs/tailwindcss-forms for v2

Looking at the commits, I think they're preparing for Tailwind 2 compatibility https://github.com/tailwindlabs/tailwindcss-custom-forms/pull/79

wobsoriano avatar Nov 20 '20 02:11 wobsoriano

I switched from custom to tailwindcss-forms + some custom CSS to apply my form styling (which I previously had set in tailwind.config.js) based on class names as I can't easily modify every field individually.

rhukster avatar Nov 23 '20 05:11 rhukster

Yep, looks like they're not planning on supporting Tailwind CSS 2

https://twitter.com/adamwathan/status/1330846547039367169

wobsoriano avatar Nov 23 '20 12:11 wobsoriano

It's all in docs https://tailwindcss.com/docs/upgrading-to-v2#update-typography-and-forms-plugins

If you are using @tailwindcss/custom-forms, you will want to migrate to @tailwindcss/forms which replaces it. Learn more about the new forms plugin in the release notes.

The @tailwindcss/custom-forms plugin is not compatible with Tailwind CSS v2.0.

ghost avatar Dec 05 '20 21:12 ghost