You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mjml-browser.js?v=275a58ae:25 Uncaught ReferenceError: window is not defined
at ../../../node_modules/mjml-browser/lib/index.js (mjml-browser.js?v=275a58ae:25:7)
at __require2 (chunk-IRSSH5FH.js?v=275a58ae:23:50)
at mjml-browser.js?v=275a58ae:24126:16
To Reproduce
Steps to reproduce the behavior:
In vite, create a web worker
Try importing import mjml2html from "mjml-browser";
See error
Expected behavior
I expect mjml-browser to work in web workers, without throwing any errors. It’s a cpu heavy process that would be perfect for web workers
MJML environment (please complete the following information):
Describe the bug
In a web worker:
To Reproduce
Steps to reproduce the behavior:
import mjml2html from "mjml-browser";
Expected behavior
I expect
mjml-browser
to work in web workers, without throwing any errors. It’s a cpu heavy process that would be perfect for web workersMJML environment (please complete the following information):
mjml-browser
Email sending environment(for rendering issues):
N/A
Affected email clients (for rendering issues):
N/A
Screenshots
N/A
Additional context
window
is not a global variable in web workers https://stackoverflow.com/a/11237259The text was updated successfully, but these errors were encountered: