Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not mangle function names in services using mjml #1339

Open
ptbrowne opened this issue Aug 10, 2020 · 0 comments
Open

Do not mangle function names in services using mjml #1339

ptbrowne opened this issue Aug 10, 2020 · 0 comments

Comments

@ptbrowne
Copy link
Contributor

ptbrowne commented Aug 10, 2020

It is necessary not to mangle classes/function names for mjml to correctly registers its components. Otherwise, mjml2html cannot find its components and fails to render an email (fails silently if the validation mode is not set to true), resulting in a blank email. In banks, the solution was to directly configure cozy-scripts' plugin, but I think we should fix this problem in cozy-scripts. The problem is that I could not get the exclude options to work in cozy-scripts. Thus I don't know how to cleanly disable terser only for mjml here.

       new TerserPlugin({
         parallel: true,
+        exclude: [/mjml/],
         //To fix a SAfari 10 bug : https://github.com/zeit/next.js/issues/5630
         terserOptions: {
           safari10: true
         }
       })

see cozy/cozy-banks#1857

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant