vite-plugin-precompiled-ejs
v1.0.1
Published
A vite plugin that implements pre-compiled ejs templates. And you can use some ES6+ syntax in ejs templates.
Downloads
1
Readme
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>