mailgen
mailgen copied to clipboard
Option to minify html template code.
Whitespace accounts to 50% of the file-size of generated emails. This can quickly add up in queueing systems that notifies thousands of users. To save CPU cycles, it'd be best to minimize the templates on init, instead of running the minifier on the output, or at render time.
Ideally just after loading it via this.cachedTheme = fs.readFileSync(themePath, 'utf8');.
Hi @iplanwebsites, Thanks so much for creating this issue and bringing this to my attention!
Would you like to submit a PR with this performance improvement? It would be welcome.