webatvantage-webpack-mjml-plugin

Webpack MJML plugin for converting MJML files to a given location


Keywords
mjml, mjml-files, tde, webpack, webpack-plugin, webpack2, webpack3
License
MIT
Install
npm install webatvantage-webpack-mjml-plugin@2.2.0

Documentation

TDE Webpack MJML Plugin

Webpack plugin for converting MJML files to HTML

Install

npm install --save-dev tde-webpack-mjml-plugin

Usage

In your webpack.config.js

var MjmlPlugin = require('tde-webpack-mjml-plugin');

module.exports = {
    // ...
    plugins: [
        new MjmlPlugin(paths.MJML, {
            extension: '.twig',
            outputPath: 'path/to/mjml'
        }),
    ]
};

API:

// webpack.config.js

module.exports = {
    plugins: [
        new MjmlPlugin(inputPath, {
            extension: options.extension,
            outputPath: options.outputPath
        }),
    ]
}

inputPath

Type: String

The path where MJML files are located

options.extension

Type: String
Default: ".html"

The default output extension

options.outputPath

Type: String
Default: ""

The path where HTML files should be written to

License

MIT © TDE