Gathering detailed insights and metrics for vite-plugin-pug
Gathering detailed insights and metrics for vite-plugin-pug
Gathering detailed insights and metrics for vite-plugin-pug
Gathering detailed insights and metrics for vite-plugin-pug
vite-plugin-pug-transformer
Vite plugin for supporting pug templates
@vituum/vite-plugin-pug
<a href="https://npmjs.com/package/@vituum/vite-plugin-pug"><img src="https://img.shields.io/npm/v/@vituum/vite-plugin-pug.svg" alt="npm package"></a> <a href="https://nodejs.org/en/about/releases/"><img src="https://img.shields.io/node/v/@vituum/vite-plu
vite-plugin-pug-i18n
Vite plugin to build static website with pug and i18n support
@povly/vite-plugin-pug
Vite plugin for transform Pug into HTML
Vite plugin for transform Pug templates into HTML
npm install vite-plugin-pug
Typescript
Module System
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Unlicense License
51 Stars
29 Commits
9 Forks
2 Watchers
5 Branches
4 Contributors
Updated on Jul 04, 2025
Latest Version
0.4.1
Package Id
vite-plugin-pug@0.4.1
Unpacked Size
15.45 kB
Size
5.60 kB
File Count
8
NPM Version
10.7.0
Node Version
20.14.0
Published on
Sep 29, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
5
A plugin that makes Vite parse <pug src="example.pug"></pug>
in your index.html
. The rendered template replaces this tag with the compiled markup.
:information_source: Vue single file components don’t require this plugin, adding Pug to the dependency list is enough. — aka
npm i -D pug
pug
tags.pug
tags..pug
file.Choose your appropriate choice:
1$ npm i -D vite-plugin-pug 2$ pnpm add -D vite-plugin-pug 3$ yarn add -D vite-plugin-pug
Create a vite.config.js
configuration file and import the plugin:
1// vite.config.(js|ts) 2import { defineConfig } from "vite" 3import pugPlugin from "vite-plugin-pug" 4 5const options = { pretty: true } // FIXME: pug pretty is deprecated! 6const locals = { name: "My Pug" } 7 8export default defineConfig({ 9 plugins: [pugPlugin(options, locals)], 10})
Name | Required | Description |
---|---|---|
options | optional | Plugin options object. |
locals | optional | Data object with Pug locals. |
Name | Required | Description |
---|---|---|
... | optional | Anything from Pug options object. |
localImports | optional | If true , use relative imports in the pug src attribute. |
Create a template file.
1//- index.pug 2h1 Hello World 3p I'm a cool Vite project!
Embed pug
tag with src
attribute somewhere.
1<!-- index.html --> 2<html> 3 <body> 4 <pug src="index.pug" /> 5 <script type="module" src="/main.ts"></script> 6 </body> 7</html>
That's it.
:bulb: Check out its starter implementation in this repository.
Please find the examples folder in this repository.
After Rollup I started to use Vite recently but this is not a reason to leave my beloved template format behind. Its lack of active Pug plugins made me make one quickly. It does the job to me, I will extend it when I need it. :suspect:
If it doesn't match with your setup please start a new discussion about it, I'm interested to see other workflows. If something is simply not working, please raise an issue. PRs certainly welcome! (.❛ ᴗ ❛.)
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/20 approved changesets -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
21 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More