A quick and dirty hack to allow mj-* tags and corresponding attributes in Preact TSX (as intrinsic elements, not components).
npm install preact-mjml-typesA quick and dirty hack to allow mj-* tags and corresponding attributes in Preact TSX (as intrinsic elements, not components).
npm install preact-mjml-types
import { h } from 'preact';
import 'preact-mjml-types'; // must go after 'preact'
import { render } from 'preact-render-to-string';
import mjml2html = require('mjml');
import { userInfo } from 'os';
const mjmlVNodes =
const mjmlCode = render(mjmlVNodes);
console.log(mjmlCode);
const result = mjml2html(mjmlCode);
console.log(result.html);
MIT