vinicoder / tw-to-css

🔄 Transform Tailwind classes to CSS
http://twtocss.com
139 stars 17 forks source link

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

Open rretlaw opened 1 year ago

rretlaw commented 1 year ago

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.

vinicoder commented 1 year ago

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.

TJacoob commented 3 months ago

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

eulerkochy commented 1 month ago

@vinicoder is this repo being actively maintained?