ejs-render-loader

1.0.0 • Public • Published

ejs-render-loader for webpack

EJS loader for webpack. Uses ejs function to compile templates.

Installation

npm install ejs-render-loader

Usage

Documentation: Using loaders

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)

Package Sidebar

Install

npm i ejs-render-loader

Weekly Downloads

193

Version

1.0.0

License

MIT

Last publish

Collaborators

  • tracker1