tde-webpack-mjml-plugin

Webpack MJML plugin for converting MJML files to a given location

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
tde-webpack-mjml-plugin
1212.0.2a year ago6 years agoMinified + gzip package size for tde-webpack-mjml-plugin in KB

Readme

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