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
muslnode 18–226 runs
build_error
glibcnode 18–226 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.
Errors
Common errors & fixes
Cannot find module 'parcel-bundler/src/Asset'
parcel-bundler peer dependency not installed
fixnpm install -D parcel-bundler@^1.1.0
asset.shouldInvalidate is not a function
Incompatible with newer Parcel v1 versions (after v1.12.3)
fixUse parcel-bundler@1.12.3 or lower, or update plugin to v0.2.5+
Audit
Dependencies
parcel-bundlerrequiredpeer dependency: plugin hooks into Parcel v1's asset system