question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breaking change with tsdx 0.12.1 with Tailwind babel macro

See original GitHub issue

Current Behavior

I’m using tailwind.macro in a React library with Storybook built with tsdx. On tsdx 0.12.0, everything was working as expected as babel macros are supported out of the box. However, when updating to 0.12.1, my builds stopped working properly with tailwind.macro.

I created a repository with the two versions and a simple component including styled-components and tailwind.macro: https://github.com/fknop/tsdx-tailwind.macro-bug. I also included the two dist folders from the two versions: 0.12.0: https://github.com/fknop/tsdx-tailwind.macro-bug/blob/master/tsdx-0.12.0/library/dist/library.esm.js 0.12.1: https://github.com/fknop/tsdx-tailwind.macro-bug/blob/master/tsdx-0.12.1/library/dist/library.esm.js

As we can see, tw is not imported anywhere in the 0.12.1 version. This makes any code importing this build failing with the function tw being undefined.

Tested on both MacOS and Windows 10.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fknopcommented, Jan 5, 2020

Thank you for the quick fix!

1reaction
agilgur5commented, Jan 4, 2020

Seems like that confirms my fears in https://github.com/jaredpalmer/tsdx/pull/130#issuecomment-569375532. Great reproduction @fknop !

The importing of tslib in 0.12.1 vs. insertion of babel helpers in 0.12 and prior is also a notable difference, related to #412

@jaredpalmer I reverted the extraneous changes of #130 in #415

Read more comments on GitHub >

github_iconTop Results From Across the Web

twin.macro - npm
Twin blends the magic of Tailwind with the flexibility of css-in-js. ... Start using twin.macro in your project by running `npm i twin.macro`...
Read more >
Changelog | Meteor API Docs
Breaking changes. The babel-compiler package, used by both ecmascript and typescript , no longer supports stripping Flow type annotations by ...
Read more >
736 kB - Hugging Face
... 1 ·several 1 ·least 1 ·hard 1 ·change 1 old 1 ·system 1 ·water ... 1 ·fall 1 ·land 1 ·risk 1...
Read more >
Untitled
Lemurs park tana, Vtl mb 185 ii, Change 8 into a fraction, Okcoin ltc price, ... Common lisp reader macros, Aqua polka dot...
Read more >
xwind/macro - npm.io
@xwind/macro is a babel macro that transforms Tailwind classes into CSS object styles. ... note: this is still experimental breaking changes are possible....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found