tw-to-css icon indicating copy to clipboard operation
tw-to-css copied to clipboard

Regex using unsupported syntax with Safari 16.3 and prior...

Open rretlaw opened this issue 2 years ago • 3 comments

I'm using React Email and I installed it into my main webapp which uses Tailwind. I'm building the emails in a section in the app and rendering and pushing the HTML versions to the server for sending. All good - no issues. But when I access the webapp from Safari (iphone or Safari browser), I was getting a compile error. I traced it to the node_module tw-to-css, which is using a regex expression that has an unsupported syntax ("safari doesn't support look-behind"). It was throwing the error in the bundle.js code and I was able to trace it to the tw-to-css module, which is of course used by the react-email/tailwind component. I commented out the React-Email imports and recompiled and pushed to the server and it resolved the issue. In searching it more, discovered the look-behind is supported in Safari (16.4+ - https://caniuse.com/js-regexp-lookbehind) but not before.

rretlaw avatar Apr 18 '23 18:04 rretlaw

Hey @rretlaw, thanks for reporting, and sorry for the update delay. Finding time can be challenging as a working father of two young children. I'll be working on a fix ASAP.

vinicoder avatar Aug 31 '23 14:08 vinicoder

@vinicoder, ever had an opportunity to take a look at this?

TJacoob avatar Jun 17 '24 16:06 TJacoob

@vinicoder is this repo being actively maintained?

eulerkochy avatar Aug 12 '24 18:08 eulerkochy