Laravel Mix EJS
This extention provides a method to compile EJS templates.
First, install the extension.
npm install laravel-mix-ejs --save-dev
Then, require it within your
webpack.mix.js file, like so:
let mix =mix
And you're done!
With the 3rd argument, it is possible to inject variables used in templates.
With the 4th argument, it is possible to set options for EJS.
You can also set the following extra options in it.
This option keeps a hierarchical structure (like Gulp).
This option changes the output file extension.
Paths set to this option will be watched but not compiled.