Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 1.48 KB

FROM_1.3.X_TO_1.4.md

File metadata and controls

36 lines (29 loc) · 1.48 KB

Migration Guide from 1.3.x to 1.4.0

Breaking Changes

  • html-minifier has been removed from the dependencies and it's now replaced by htmlnano (as a peer dependency) (reported by #268).
  • The minifyHtmlOutput is now false by default, since htmlnano require a bit more configuration to work properly.
  • The htmlMinifierOptions as been rename to templateMinifierOptions and it's now an object with the following properties:
    • options: (optional) Wich is the options object passed to htmlnano.
    • preset: (optional) Which is the preset used by htmlnano.

How to migrate

1. Update the nodemailer-mjml version

npm install nodemailer-mjml@latest
or
yarn add nodemailer-mjml@latest

2. If you where using minifyHtmlOutput, you will need to enable it explicitly in the options

3. Install htmlnano dependency (as a dev dependency)

npm install --save-dev htmlnano
or
yarn add -D htmlnano

Note

If you want html minification, you will need to also install posthtml
If you want html minification, you will need to also install postcss and cssnano
If you want js minification, you will need to also install terser
If you want svg minification, you will need to also install svgo

More information about the htmlnano options can be found here. ‡

4. Update the plugin options by removing htmlMinifierOptions and adding templateMinifierOptions with your desired options