@maizzle/nuxt
Getting Started
Install the module:
npm i -D @maizzle/nuxt
Register it in nuxt.config.ts:
export default defineNuxtConfig({
modules: ['@maizzle/nuxt'],
})
Usage
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')
Configuration
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 |
Documentation
Maizzle documentation is available at https://maizzle.com
Issues
Please report bugs in the issue tracker.
License
Open-sourced software licensed under the MIT license.
Related Packages
@nxgt/mail-ui
E-mail components for a Maizzle project in the style of @nxgt/material-vue: NxLa...
2,947
0
Version History
| Version | Released | License |
|---|---|---|
| 1.0.0 | MIT | |
| 0.2.1 | MIT | |
| 0.2.0 | MIT | |
| 0.1.0 | MIT |