@maizzle/nuxt
v0.2.0
Published
Nuxt module for the Maizzle email framework
Readme
Getting Started
Install the module:
npm i -D @maizzle/nuxtRegister 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.
