Install the module:
npm i -D @maizzle/nuxtRegister it in nuxt.config.ts:
export default defineNuxtConfig({
modules: ['@maizzle/nuxt'],
})Create your email templates in the emails/ folder. The location depends on your Nuxt version:
| Nuxt | Path |
|---|---|
| 4 | app/emails/ |
| 3 | emails/ |
Run nuxt dev — the Maizzle dev server starts on port 4321 alongside Nuxt.
On nuxt build, compiled HTML is written to server/assets/emails/ and bundled into the Nitro server output. Read it at runtime via:
const html = await useStorage('assets:server').getItem('emails:welcome.html')All Maizzle config options can be passed under the maizzle key:
export default defineNuxtConfig({
modules: ['@maizzle/nuxt'],
maizzle: {
content: ['custom/path/**/*.{vue,md}'],
output: { path: 'custom/output' },
server: { port: 5173 },
},
})Defaults applied by this module:
| Option | Default |
|---|---|
content |
<srcDir>/emails/**/*.{vue,md} |
output.path |
server/assets/emails |
server.port |
4321 |
Maizzle documentation is available at https://maizzle.com
Please report bugs in the issue tracker.
Open-sourced software licensed under the MIT license.