Transformers
After Vue SSR renders your template to HTML, Maizzle runs it through a pipeline of transformers that optimize the output for email clients.
Some of the Transformers help you automate tedious tasks that are required when developing HTML emails, like inlining CSS, automatically adding attributes for better accessibility, or generating plaintext versions of your emails.
Defaults
The following transformers are enabled by default:
css.inlineinlines CSS into elementstyleattributescss.purgeremoves unused CSScss.shorthandrewrites longhandmargin/padding/borderto shorthandcss.safeescapes Tailwind class names with:,/, etc.html.formatpretty-prints the output (auto-skipped whenhtml.minifyis enabled)html.decodeEntitiesdecodes HTML entities
Pass false on any of these keys to opt out.
Disabling transformers
Disable the entire pipeline globally:
export default defineConfig({
useTransformers: false,
})
Or per-template via the useTransformers() composable inside <script setup>. Pass false to disable all transformers, or an object to toggle individual ones:
<script setup>
useTransformers(false)
// or: useTransformers({ inlineCss: false, purgeCss: false })
</script>
Keys set to true force-enable that transformer even if it is disabled in the global config.
Individual configuration
Each transformer can be configured individually through your config file. For example, CSS inlining and purging are controlled under the css key:
export default defineConfig({
css: {
inline: true,
purge: true,
safe: true,
shorthand: true,
},
})
See the individual transformer pages for all available options.