1.0.6 • Published 2 years ago

ejs-prerender-loader v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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.

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.0-alpha.2

4 years ago

0.1.0-alpha.1

4 years ago

0.1.0-alpha.0

4 years ago