ejs-render-loader
v1.0.0
Published
EJS webpack loader (without frontend dependencies)
Downloads
808
Readme
ejs-render-loader for webpack
EJS loader for webpack. Uses ejs function to compile templates.
Installation
npm install ejs-render-loader
Usage
var template = require('ejs-render!./file.ejs');
// => returns rendered output from file.ejs
// Child Templates
// path is relative to template
<%- include childdir/child -%>
// Query Parameters: (passed to template)
// raw (boolean) - output raw markup, for use with file-loader
// ejs (object) - options to pass to ejs.compile
require('!!file?name=[name].html!ejs-render?raw=true!./client/html/index.ejs');
License
MIT (http://www.opensource.org/licenses/mit-license.php)