/ejs4html-loader

EJS loader for webpack [html-loader].

Primary LanguageJavaScript

ejs4html-loader for webpack.

EJS loader for webpack [html-loader]. Uses ejs function to render templates.

Installation

npm install ejs4html-loader

Usage

Documentation: Using loaders

 module:{
 	loaders: [
 		{
 			test: /\.ejs$/,
 			loader: "html!ejs-render"
 		}
 	]
 },
 plugins: [
	new HtmlWebpackPlugin({
		filename: 'index.html',
		template: 'index.ejs', 
		inject: 'body', 
		minify: { 
			removeComments: true,
			collapseWhitespace: true
		}
	})
],

License

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