Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webpack email templates

Tags:

webpack

I want to use Webpack for bundling my email templates.

I pretty much have a .html file for each of the templates, which references a common .scss file for styles.

I want the styles to be inlined in the HTML

Is this possible?

like image 873
Tarlen Avatar asked Nov 09 '22 16:11

Tarlen


1 Answers

If you want to use webpack, seems to me this is a job for inline-style-loader: https://www.npmjs.com/package/inline-style-loader

There's a demo for how to integrate this into your webpack.config.js file here: https://github.com/jbsouvestre/inline-style-loader/tree/master/demo

like image 174
arm5077 Avatar answered Jan 04 '23 01:01

arm5077