Skip to content
PluginStats

vite-plugin-pug weekly downloads statistics

By SubZtep · npm · Vite plugins

Vite plugin for transform Pug templates into HTML

View on npm Fresh · Dec 6, 2026

vite-plugin-pug has 27,124 recorded weekly downloads on npm, a decrease of 1.5% over the past 30 days, ranking #948 of 3,247 tracked listings.

Weekly downloads
27,124
Official API · Dec 5, 2026
7-day growth
+77.7%
+11.9K weekly downloads
30-day growth
-1.5%
-417 weekly downloads
90-day growth
+65.5%
+10.7K weekly downloads
Rank
#948
▲ 164 in 7 days

About vite-plugin-pug

vite-plugin-pug

test

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

Features

  • CommonJS and ES module builds.
  • Handle self-closing pug tags.
  • Works with multiple pug tags.
  • Generated TypeScript declarations.
  • Reload when saving changes on a .pug file.
  • Support Pug local variables.
  • Templates for multiple inputs.
  • Experimental hot module reloading functionality.
  • Handle adding or removing files.

Add to a project

Installation

Choose your appropriate choice:

$ npm i -D vite-plugin-pug
$ pnpm add -D vite-plugin-pug
$ yarn add -D vite-plugin-pug
Configuration

Create a vite.config.js configuration file and import the plugin:

// vite.config.(js|ts)
import { defineConfig } from "vite"
import pugPlugin from "vite-plugin-pug"

const options = { pretty: true } // FIXME: pug pretty is deprecated!
const locals = { name: "My Pug" }

export default defineConfig({
  plugins: [pugPlugin(options, locals)],
})
Plugin Parameters
NameRequiredDescription
optionsoptionalPlugin options object.
localsoptionalData object with Pug locals.
Plugin Options
NameRequiredDescription
...optionalAnything from Pug options object.
localImportsoptionalIf true, use relative imports in the pug src attribute.

Usage

Simple

Create a template file.

//- index.pug
h1 Hello World
p I'm a cool Vite project!

Embed pug tag with src attribute somewhere.

<!-- index.html -->
<html>
  <body>
    <pug src="index.pug" />
    <script type="module" src="/main.ts"></script>
  </body>
</html>

That's it.

:bulb: Check out its starter implementation in this repository.

Examples

Please find the examples folder in this repository.

Contribution

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! (.❛ ᴗ ❛.)

Description from the npm listing.

  • vite
  • vite-plugin
  • pug
  • jade

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

vite-plugin-pug weekly downloads on npm, last 90 days: 27,124 weekly downloads as of Dec 5, 2026, +65.5% over 90 days.vite-plugin-pugWeekly downloads on npm · Last 90 days27,124downloads / week+65.5% over 90 days05K10K15K20K25K30K35K40KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-plugin-pug weekly downloads on npm, last 90 days: 27,124 weekly downloads as of Dec 5, 2026, +65.5% over 90 days.

7/30/90-day growth

vite-plugin-pug weekly downloads growth on npm: +77.7% over 7 days, -1.5% over 30 days, +65.5% over 90 days.vite-plugin-pugWeekly downloads growth on npm27,124downloads / week now7-day growth+11,856 weekly downloads+77.7%30-day growth-417 weekly downloads-1.5%90-day growth+10,734 weekly downloads+65.5%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-pug weekly downloads growth on npm: +77.7% over 7 days, -1.5% over 30 days, +65.5% over 90 days.

Ranking history

vite-plugin-pug npm ranking history: currently #948 (by weekly downloads).vite-plugin-pugnpm ranking · by weekly downloads · Last 90 days#948current rank#800#850#900#950#1000#1050#1100#1150Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-pug npm ranking history: currently #948 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 48, #8 (overall #948)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 9, #2 (overall #162)
Vite plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for vite-plugin-pug
Date (UTC)Weekly downloadsChange vs. previous
27,124-252
27,376+1.3K
26,042+1.7K
24,353+5.3K
19,004+1.4K
17,625+1.8K
15,843+575
15,268+237
15,031-813
15,844-386
16,230-1.3K
17,508-1K
18,530-1.1K
19,663—

Similar npm Vite plugins plugins

All 20 vite-plugin-pug alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/vite-plugin-pug. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.