Skip to content

v10258/ejs-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ejs-loader for webpack

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

Installation

npm install ejs-loader

Usage

var template = require("ejs!./file.ejs");
// => returns the template function compiled with undesrcore (lodash) templating engine.

// And then use it somewhere in your code
template(data) // Pass object with data

Options

module.exports = {
    module: {
        loaders: [
            {
                test: /\.ejs$/, 
                loader: 'ejs-loader'
            },
        ]
    }
};

Including nested templates

Release History

  • 0.0.1 - Initial release

License

MIT (http://www.opensource.org/licenses/mit-license.php)

About

EJS loader for webpack4.0

Resources

License

Stars

Watchers

Forks

Packages

No packages published