TDE Webpack MJML Plugin
Webpack plugin for converting MJML files to HTMLInstall
npm install --save-dev tde-webpack-mjml-plugin
Usage
In yourwebpack.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