New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vite-plugin-mjml

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-mjml

MJML plugin for Vite

latest
Source
npmnpm
Version
0.4.0
Version published
Weekly downloads
2.2K
7.73%
Maintainers
1
Weekly downloads
 
Created
Source

MJML plugin for Vite

Status   version

A plugin for compiling mjml files in your Vite pipeline.

npm i -D vite-plugin-mjml

 

Usage

Install vite-plugin-mjml and add it to your Vite configuration:

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import laravel from 'vite-plugin-laravel'
import mjml from 'vite-plugin-mjml'

export default defineConfig({
	plugins: [
		laravel(),
		vue(),
		mjml({
			input: 'resources/mail',
			output: 'resources/views/emails',
			extension: '.blade.php',
		}),
	],
})

When running vite dev, all .mjml files in your input directory will be compiled to output when saved. Similarly, when building for production, all files in input will be compiled as well.

For instance, resources/mail/onboarding/welcome.mjml would be written to resources/views/emails/onboarding/welcome.blade.php.

 

Options

OptionTypeDescriptionDefault
inputstringPath to the directory in which .mjml files are storedresources/mail
outputstringPath to the directory in which compiled files will be writtenresources/views/emails
extensionstringExtension that will be used by compiled .mjml files.blade.php
mjmlMJMLParsingOptionsSpecific MJML compiler options{}
watchbooleanWhether to watch and compile on the fly in development modetrue
logbooleanWhether to print output in the consoletrue



·

Built with ❤︎ by Enzo Innocenzi

FAQs

Package last updated on 24 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts