# ejs-render-remote

> [ejs](https://ejs.co/) remote client side includes.

Latest version **1.1.0** (published 2026-04-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install ejs-render-remote
pnpm add ejs-render-remote
yarn add ejs-render-remote
bun add ejs-render-remote
```

## Health

**Score 45/100 (D)** — status: active.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2026-04-05 |
| First published | 2019-04-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 115.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | s2 |
| Maintainers | s2 |
| Keywords | ejs, templating, client-side |

## Links

- npm: https://www.npmjs.com/package/ejs-render-remote
- Homepage: https://github.com/S2-/ejs-render-remote
- npm.io page: https://npm.io/package/ejs-render-remote

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2026-04-05
- 1.0.13 — 2020-02-12
- 1.0.12 — 2020-02-08
- 1.0.11 — 2020-02-08
- 1.0.10 — 2020-02-08
- 1.0.9 — 2020-02-07
- 1.0.8 — 2020-02-07
- 1.0.7 — 2019-05-03
- 1.0.6 — 2019-04-18
- 1.0.5 — 2019-04-18
- 1.0.4 — 2019-04-18
- 1.0.3 — 2019-04-14
- 1.0.2 — 2019-04-14
- 1.0.1 — 2019-04-14
- 1.0.0 — 2019-04-14

## README

# ejs-render-remote

[ejs](https://ejs.co/) remote client side includes.

```js
html = ejs.rr('sayhello.ejs', {name: 'Simon'});
```

## Quick start

0. Install with `npm i ejs-render-remote`
1. Include this script
   ```html
   <script src="node_modules/ejs-render-remote/ejs-render-remote.js"></script>
   ```
2. Create a file with your template, for example `templates/hello-world.ejs` containing `hello <%= name %>!`
3. Render the remote template:
   ```js
   someDomelement.outerHTML = ejs.rr('templates/hello-world.ejs', {name: 'Simon'});
   ```

## Examples

See `examples` folder.

## api

### ejs.rr(templateUrl, data)

`ejs.rr` (render remote) renders the remote template. It fetches the template and then `ejs.render`s it.  
The resulting ejs template function is cached, so the second time this function is invoked for that same template, `ejs.rr` returns the rendered template synchronously.

### ejs.preloadTemplate(templateUrl)

Since `ejs.rr` is async, you can call `ejs.preloadTemplate` before invoking `ejs.rr` to warm the template cache up for that `templateUrl`.  
By doing so the call to `ejs.rr` will return the rendered template string right away.

---
_Source: https://npm.io/package/ejs-render-remote · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
