Skip to content

ejs-compiled-loader 4.0.0

Install from the command line:
Learn more about npm packages
$ npm install @myrotvorets/ejs-compiled-loader@4.0.0
Install via package.json:
"@myrotvorets/ejs-compiled-loader": "4.0.0"

About this version

ejs-compiled-loader for webpack

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

This is the fork of the now abandoned bazilio91/ejs-compiled-loader with updated dependencies, fixed vulnerabilities, and updated code base.

The main differences are:

  • uses [email protected] instead of 2.x because ejs up to 3.1.9 has multiple vulnerabilities (CVE-2022-29078, CVE-2024-33883);
  • uses html-minifier-terser instead of the abandoned html-minifier (which is affected by a ReDoS vulnerability). Some options of html-minifier-terser differs from those of html-minifier;
  • does not suppoprt Webpack 4.x.

Installation

npm install -D @myrotvorets/ejs-compiled-loader

Usage

Documentation: Using loaders

const template = require("ejs-compiled-loader!./file.ejs");
// => returns the template function compiled with ejs templating engine.

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

Options

The following options are supported:

License

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

Details


Assets

  • ejs-compiled-loader-4.0.0.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all