vite-plugin-precompiled-ejs
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

vite-plugin-precompiled-ejs

A vite plugin that implements pre-compiled ejs templates. And you can use some ES6+ syntax in ejs templates.

Install

npm i vite-plugin-precompiled-ejs -D

Usage

vite.config.ts

import { defineConfig } from 'vite';
import precompiledEjs from 'vite-plugin-precompiled-ejs';


export default defineConfig({
  ...
  plugins: [
    precompiledEjs()
  ],
  ...
});

some.ejs

<div>
  <% const { a, b, c } = locals; %>
  <%- a + b + c %>
</div>

Readme

Keywords

none

Package Sidebar

Install

npm i vite-plugin-precompiled-ejs

Weekly Downloads

31

Version

1.0.1

License

MIT

Unpacked Size

11.2 kB

Total Files

8

Last publish

Collaborators

  • jkxydp