Laravel Mix EJS
This extention provides a method to compile EJS templates.
Usage
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!
Data
With the 3rd argument, it is possible to inject variables used in templates.
mix
Options
With the 4th argument, it is possible to set options for EJS.
mix
You can also set the following extra options in it.
base
This option keeps a hierarchical structure (like Gulp).
mix
ext
This option changes the output file extension.
mix
partials
Paths set to this option will be watched but not compiled.
mix