Socket
Socket
Sign inDemoInstall

ejs-prerender-loader

Package Overview
Dependencies
29
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ejs-prerender-loader

## Basis


Version published
Weekly downloads
5
decreased by-28.57%
Maintainers
1
Install size
1.55 MB
Created
Weekly downloads
 

Readme

Source

ejs-prerender-loader

Basis

Warning: This loader requires Webpack 5!

This webpack plugin is based on the ejs-prerender package. See that for more information on configuration options and goals. This Webpack loader was specifically created for use by ejs-prerender-webpack-plugin.

Usage

While most other EJS Webpack loaders are for client implementations, the goal of this loader is for pre-rendering. This means it acts like a template engine for a web server, allowing full usage of <%- include('my-partial', { data: 'my data' }) -%> for passing data to dynamic partials. While it is designed for use by the aforementioned Webpack plugin, it can be used separately by including it in your Webpack config's module rules.

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

For a full example of the plugin being used, look at the ejs-starter repository.

FAQs

Last updated on 29 Mar 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc