Skip to content

maizzle/nuxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maizzle Nuxt module

Build HTML emails in Nuxt with Maizzle

Version Downloads License

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.

About

Nuxt module for Maizzle

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors