Registry / web-framework / parcel-plugin-pug

parcel-plugin-pug

JSON →
library0.3.1jsnpmunverified

Pug template support for Parcel bundler. Current stable version is 0.3.1. Maintenance mode: last release 2020, Parcel v1 only. Handles .pug and .jade files, resolves includes/extended templates and assets inside files. Requires Parcel 1.x, not compatible with Parcel v2.

npm install parcel-plugin-pug
INSTALL
IMPORT
SIG · PARCEL-PLUGIN-PUG
P
parcel-plugin-pug
web-frameworkjavascriptv0.3.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
Install and use via Parcel (no explicit import needed)
const plugin = require('parcel-plugin-pug')
Plugin auto-registers with Parcel v1 when installed. Only use require/import if you need the asset type directly.
PugAsset
const PugAsset = require('parcel-plugin-pug/src/Asset')
import { PugAsset } from 'parcel-plugin-pug'
PugAsset is not exported from main entry; must require internal path.
PugPlugin
module.exports = require('parcel-plugin-pug')
import PugPlugin from 'parcel-plugin-pug'
Plugin is CommonJS only; no ESM export. Use require or Parcel's plugin resolution.

Shows minimal setup with Parcel v1, including a .pug file with asset reference and build command.

// Install Parcel v1 and plugin npm install -D parcel-bundler@1 parcel-plugin-pug // Create index.pug: doctype html html head title Parcel + Pug body h1 Hello World p This is a Pug template bundled with Parcel. img(src="image.jpg" alt="test") // Run: // npx parcel index.pug // Opens localhost:1234 with compiled HTML.
Debug
Known issues
breakingParcel v2 is not supported; the plugin only works with Parcel v1.
fix
Use Parcel v1 (parcel-bundler@^1.1.0) or migrate to Parcel v2's built-in Pug support.
affects: >=0.0.0
gotchaPlugin requires parcel-bundler as a peer dependency; missing it causes 'Cannot find module' error.
fix
Run npm install -D parcel-bundler@^1.0.0 in project.
affects: >=0.0.0
deprecatedParcel v1 itself is deprecated; consider migrating to Parcel v2.
fix
Upgrade to Parcel v2 and use its native Pug support or community alternatives.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'parcel-bundler/src/Asset'
parcel-bundler peer dependency not installed
fix
npm install -D parcel-bundler@^1.1.0
asset.shouldInvalidate is not a function
Incompatible with newer Parcel v1 versions (after v1.12.3)
fix
Use parcel-bundler@1.12.3 or lower, or update plugin to v0.2.5+
Upgrade
Version history
0.3.1latest on npm
Audit
Dependencies
parcel-bundlerrequiredpeer dependency: plugin hooks into Parcel v1's asset system
Agent activity
2 hits · last 30 days
node
2
Resources
parcel-plugin-pug — npm install parcel-plugin-pug · libregistry