twin.macro icon indicating copy to clipboard operation
twin.macro copied to clipboard

Tailwind v3 updates

Open ben-rogerson opened this issue 2 years ago โ€ข 33 comments

We're currently testing the next major version of twin which syncs with tailwindcss v3

Help test the next release:

npm install twin.macro@rc

๐Ÿ”ฅ Bugs / Issue discussion โ†’

Newest update - rc.4

  • ๐ŸŒŸ Update and use new tailwindcss features as soon as they're released
    tailwindcss was moved to peerDependencies meaning you can install new versions of tailwindcss as soon as they're released
  • ๐ŸŒŸ Full plugin support
    twin now recognises all tailwindcss plugins now that it shares the same API
  • Disabling core plugins in tailwind.config.js is now supported
    Most people will use this feature just to turn off preflight styles
  • Turn off console log coloring
    Sometimes frameworks add twin's error logs in their error overlay which doesn't support the custom log colours twin uses. A bunch of color characters are added making it hard to read - you can clean this up now with hasLogColors: false added in your twin config
  • Better suggestions
    Twin will make better recommendations if you get class wrong
  • Better performance
    You'll see much faster conversions, specially in larger codebases

More at https://github.com/ben-rogerson/twin.macro/pull/739

History

[email protected]

ben-rogerson avatar Dec 11 '21 23:12 ben-rogerson

waiting for the update.

prabhaw avatar Dec 14 '21 13:12 prabhaw

This is an awesome news! I'm using tailwind with stitches and can't wait for this. Thanks @ben-rogerson !

gr-qft avatar Dec 15 '21 00:12 gr-qft

Just leaving a message to tell you Twin is extremely great and has made me love Tailwind even for larger projects, where Tailwind normally gets unwieldily. Thank you so much for your hard work on this, excited for Tailwind 3.0 support!

aroc avatar Dec 15 '21 02:12 aroc

Thanks cant wait to add new features to my site :)

RohitM-IN avatar Dec 16 '21 13:12 RohitM-IN

Damn haha, excited for the integrations with the latest tailwindcss update! Y'all are amazing bunch ๐Ÿ˜„

MarioSerano avatar Dec 18 '21 13:12 MarioSerano

Take all the time you need, and sorry about that crazy changelog, Thanks for all your hard work on this!

RangerCoder99 avatar Dec 18 '21 15:12 RangerCoder99

Missing:

  • [ ] https://github.com/tailwindlabs/tailwindcss/pull/4723

lightyen avatar Dec 21 '21 04:12 lightyen

Waiting on this update. Will it resolve this issue?

ModuleBuildError: Module build failed (from ./node_modules/gatsby/dist/utils/babel-loader. js): TypeError: /Users/USER/Code/GitHub/SITE/src/layouts/Layout.tsx: twin.macro: Cannot read properties of undefined (reading '700') Learn more: https://www.npmjs.com/package/twin.macro

crock avatar Jan 01 '22 15:01 crock

Waiting on this update. Will it resolve this issue?

ModuleBuildError: Module build failed (from ./node_modules/gatsby/dist/utils/babel-loader. js): TypeError: /Users/USER/Code/GitHub/SITE/src/layouts/Layout.tsx: twin.macro: Cannot read properties of undefined (reading '700') Learn more: https://www.npmjs.com/package/twin.macro

Disregard this reply. It worked as normal as soon as I updated postcss and autoprefixer.

crock avatar Jan 01 '22 15:01 crock

Waiting on this update. Will it resolve this issue?

ModuleBuildError: Module build failed (from ./node_modules/gatsby/dist/utils/babel-loader. js): TypeError: /Users/USER/Code/GitHub/SITE/src/layouts/Layout.tsx: twin.macro: Cannot read properties of undefined (reading '700') Learn more: https://www.npmjs.com/package/twin.macro

Disregard this reply. It worked as normal as soon as I updated postcss and autoprefixer.

I ran into the same issue with the latest versions of postcss (8.4.5), autoprefixer (10.4.1) and tailwindcss (2.2.19). What helped me fix the issue was to use the following presets section in babel.config.js: presets: [ [ '@babel/preset-env', { modules: false, }, ], [ "@babel/preset-react", { "runtime": "automatic", "importSource": "@emotion/react" } ], ],

See: https://emotion.sh/docs/css-prop##babel-preset

bumi001 avatar Jan 05 '22 06:01 bumi001

Hey all - just a quick update. I've been laying some foundational features ahead of the list above. It has been a bit of a struggle - especially with the changes to the user plugin api - but I'm nearing the end and getting ready to tackle the list above. Thanks for being patient ๐Ÿ‘

ben-rogerson avatar Jan 05 '22 23:01 ben-rogerson

the least we can do is be patient and is there anything we can do to help @ben-rogerson?

and also thank YOU for twin.macro!

ajmalafif avatar Jan 09 '22 03:01 ajmalafif

@ajmalafif I'm going to update the list soon to show some of the "lower hanging" features. Once that's updated, I'll welcome any help on those.

ben-rogerson avatar Jan 13 '22 21:01 ben-rogerson

Waiting for new version to!

smugller avatar Feb 12 '22 16:02 smugller

Iโ€™m new to the project, but Iโ€™d be happy to contribute a PR for border hidden utility as a first contribution. Not sure if this is where you want comments since Iโ€™m not seeing volunteers anywhere else and PRs are going through. Thanks!

dbowling avatar Feb 17 '22 14:02 dbowling

๐ŸŽ‰ The list seems all done! Will a new version be released in the near future? ๐Ÿ˜

u3u avatar Apr 28 '22 15:04 u3u

Yes, list is pretty much done woohoo! Right now I'm going over the new features and testing for bugs. If nothing pops up then its release time shortly after ๐Ÿ‘

ben-rogerson avatar Apr 28 '22 21:04 ben-rogerson

@ben-rogerson

VERY exciting news, and it seems like a TON of work went into this. Would it be correct to assume that 2.8.2 tracks to Tailwind 2 but that the next release will have the tailwind 3 compatibility mentioned in this issue?

In the interim, is there a guide that shows how to take this repo and turn it into a npm repo to help with final testing?

ralphbrooks avatar Apr 30 '22 18:04 ralphbrooks

Thank you so much for all this work! I've been using twin.macro for ~1 year and it has been an absolute pleasure. Can't imagine using Tailwind without it anymore.

I am really looking forward for v3 to be released ...

nibtime avatar Apr 30 '22 19:04 nibtime

@ralphbrooks That's right, v3 Twin will track v3 Tailwindcss and contain all the features in the list above.

ben-rogerson avatar Apr 30 '22 23:04 ben-rogerson

@ben-rogerson , what do you think about releasing a beta or a release candidate version for us testing? I think it'll be easier than cloning and linking the project locally.

To avoid pollute the latest tag, you can publish with --tag rc:

npm run publish --tag rc #or --tag beta

So we people who's gonna install twin.macro by running npm add twin.macro will still get v2 stable version and we can run npm add twin.macro@rc will get v3 to test.

raulfdm avatar May 01 '22 09:05 raulfdm

@raulfdm Sounds like a great idea.

Release candidate is up and ready for testing:

npm install twin.macro@rc

Bugs / Issue discussion โ†’

ben-rogerson avatar May 02 '22 21:05 ben-rogerson

@ben-rogerson thank you (and everyone involved) so much for this huge effort! We're very much looking forward for the release! โค๏ธ

nilsborg avatar May 03 '22 18:05 nilsborg

moved

JPrisk avatar Jun 12 '22 22:06 JPrisk

Hi there, I'm trying out [email protected] and everything works very smoothly. However, I'm unable to deploy my project to Vercel as their Node version is 16.14.0 while the Twin requires >=16.14.2. I'm just wondering if there's a fix for this on my side or if there's anything to do to fix the issue.

Thanks a lot for your work on this package and I'd love to make it work with our project.


Hmmm I see that there's already a fix for this, look forward to the new version!

alexluong avatar Jun 13 '22 09:06 alexluong

@alexluong as a workaround you can also install dependencies with ignoring engines (needed that for vercel before)

wottpal avatar Jun 13 '22 11:06 wottpal

๐Ÿ“ข I've left a new update in the description

ben-rogerson avatar Jul 27 '22 13:07 ben-rogerson

@ben-rogerson I'm seeing this in our TypeScript enabled project:

Screen Shot 2022-09-01 at 17 38 04

Actually not sure if this is even TS related .. ?

Just installed the latest rc

nilsborg avatar Sep 01 '22 15:09 nilsborg

We just switched all of landfolk.com (3 different sites in a huge monorepo) to [email protected] a few weeks ago and everything is running smoothly. Looking forward to the final release ๐ŸŽ‰

chriskjaer avatar Sep 01 '22 20:09 chriskjaer

We just switched all of landfolk.com (3 different sites in a huge monorepo) to [email protected] a few weeks ago and everything is running smoothly. Looking forward to the final release ๐ŸŽ‰

This is actually a cool website in and of itself. Good job on the transition ๐Ÿ‘

IgnusG avatar Sep 02 '22 07:09 IgnusG