{"id":19097075,"url":"https://github.com/matteobertoldo/webpack-mjml-plugin","last_synced_at":"2025-07-21T18:34:39.316Z","repository":{"id":37007986,"uuid":"498339884","full_name":"matteobertoldo/webpack-mjml-plugin","owner":"matteobertoldo","description":"📮 Webpack MJML plugin for compiling MJML files.","archived":false,"fork":false,"pushed_at":"2025-01-29T15:55:49.000Z","size":3710,"stargazers_count":4,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T14:29:53.418Z","etag":null,"topics":["mjml","mjml-framework","mjml-to-html","webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/webpack-mjml-plugin","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matteobertoldo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["paypal.me/matteobertoldo","buymeacoffee.com/matteobertoldo"]}},"created_at":"2022-05-31T13:06:41.000Z","updated_at":"2025-01-29T15:55:54.000Z","dependencies_parsed_at":"2023-12-15T11:27:32.498Z","dependency_job_id":"63e9711d-6143-4cd8-97d6-b8bf1bedbb28","html_url":"https://github.com/matteobertoldo/webpack-mjml-plugin","commit_stats":{"total_commits":72,"total_committers":3,"mean_commits":24.0,"dds":0.2777777777777778,"last_synced_commit":"e4009be6e16f865ca22d9ba80eee9f7bda63491b"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteobertoldo%2Fwebpack-mjml-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteobertoldo%2Fwebpack-mjml-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteobertoldo%2Fwebpack-mjml-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteobertoldo%2Fwebpack-mjml-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matteobertoldo","download_url":"https://codeload.github.com/matteobertoldo/webpack-mjml-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251721335,"owners_count":21632814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mjml","mjml-framework","mjml-to-html","webpack","webpack-plugin"],"created_at":"2024-11-09T03:38:41.988Z","updated_at":"2025-04-30T14:29:59.178Z","avatar_url":"https://github.com/matteobertoldo.png","language":"JavaScript","funding_links":["paypal.me/matteobertoldo","buymeacoffee.com/matteobertoldo"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg\n    width=\"500px\"\n    src=\"https://raw.githubusercontent.com/matteobertoldo/webpack-mjml-plugin/master/assets/webpack-mjml-plugin-logo.svg?sanitize=true\"\n    alt=\"Webpack MJML Plugin - Logo\"\n  /\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003eWebpack \u003ca href=\"https://mjml.io\"\u003eMJML\u003c/a\u003e Plugin for compiling \u003ccode\u003e.mjml\u003c/code\u003e files.\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/prettier/prettier\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/code_of-conduct-ff69b4.svg\" alt=\"Prettier\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://snyk.io/test/github/matteobertoldo/webpack-mjml-plugin?targetFile=package.json\"\u003e\n    \u003cimg src=\"https://snyk.io/test/github/matteobertoldo/webpack-mjml-plugin/badge.svg?targetFile=package.json\" alt=\"Known Vulnerabilities\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/matteobertoldo/webpack-mjml-plugin/actions/workflows/npm-publish.yml\"\u003e\n    \u003cimg src=\"https://github.com/matteobertoldo/webpack-mjml-plugin/actions/workflows/npm-publish.yml/badge.svg\" alt=\"GitHub CI Build\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/webpack-mjml-plugin\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dt/webpack-mjml-plugin.svg\" alt=\"NPM Package Downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/webpack-mjml-plugin\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/webpack-mjml-plugin.svg\" alt=\"NPM Package Version\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Installation :gift:\n\n```sh\nnpm install webpack-mjml-plugin\n```\n\n## Usage :joystick:\n\nIn your `webpack.config.js` simply:\n\n```javascript\nconst MJMLPlugin = require('webpack-mjml-plugin');\n\nmodule.exports = {\n  // ...\n  plugins: [\n    new MJMLPlugin('src/to/mjml/*.mjml', {\n      extension: '.html',\n      outputPath: path.resolve(__dirname, 'dist/to/mjml')\n    });\n  ]\n};\n```\n\n## API :bee:\n\nThe plugin supports all `options` that can be found in [this documentation](https://documentation.mjml.io/#inside-node-js).\n\n```js\n// webpack.config.js\n\nmodule.exports = {\n  plugins: [\n    new MJMLPlugin(inputPath, {\n      extension: options.extension,\n      outputPath: options.outputPath,\n      // MJML options (https://documentation.mjml.io/#inside-node-js)\n      filePath: path.resolve(__dirname, 'src/to/mjml'),\n      keepComments: false\n    })\n  ]\n};\n```\n\nIn addition to the options available in the MJML documentation, there are 3 additional parameters described in the table below:\n\n| Parameter            |   Type   |     Default     | Description                                                                                                                                               |\n| -------------------- | :------: | :-------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `inputPath`          | `string` |   `undefined`   | The path where `.mjml` files are located. The string supports [glob](https://github.com/isaacs/node-glob#glob-primer) syntax ex: `path/to/mjml/**/*.mjml` |\n| `options.extensions` | `string` |     `.html`     | The default output extension.                                                                                                                             |\n| `options.outputPath` | `string` | `process.cwd()` | The path where compiled files should be written to.                                                                                                       |\n\n## Contributing :busts_in_silhouette:\n\nPlease read [CONTRIBUTING.md](https://github.com/matteobertoldo/webpack-mjml-plugin/blob/master/CONTRIBUTING.md) for details on code of conduct, and the process for submitting pull requests.\n\n## License :balance_scale:\n\n\u003cp\u003e\n  \u003ca href=\"https://www.npmjs.com/package/webpack-mjml-plugin\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/webpack-mjml-plugin.svg\" alt=\"NPM License\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nWebpack MJML Plugin is licensed under the MIT License - see the [LICENSE.md](https://github.com/matteobertoldo/webpack-mjml-plugin/blob/master/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteobertoldo%2Fwebpack-mjml-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatteobertoldo%2Fwebpack-mjml-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteobertoldo%2Fwebpack-mjml-plugin/lists"}