-
Notifications
You must be signed in to change notification settings - Fork 23
Description
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.