{"id":18650,"library":"parcel-plugin-pug","title":"parcel-plugin-pug","description":"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.","status":"maintenance","version":"0.3.1","language":"javascript","source_language":"en","source_url":"https://github.com/Ty3uK/parcel-plugin-pug","tags":["javascript","typescript"],"install":[{"cmd":"npm install parcel-plugin-pug","lang":"bash","label":"npm"},{"cmd":"yarn add parcel-plugin-pug","lang":"bash","label":"yarn"},{"cmd":"pnpm add parcel-plugin-pug","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: plugin hooks into Parcel v1's asset system","package":"parcel-bundler","optional":false}],"imports":[{"note":"Plugin auto-registers with Parcel v1 when installed. Only use require/import if you need the asset type directly.","wrong":"const plugin = require('parcel-plugin-pug')","symbol":"default","correct":"Install and use via Parcel (no explicit import needed)"},{"note":"PugAsset is not exported from main entry; must require internal path.","wrong":"import { PugAsset } from 'parcel-plugin-pug'","symbol":"PugAsset","correct":"const PugAsset = require('parcel-plugin-pug/src/Asset')"},{"note":"Plugin is CommonJS only; no ESM export. Use require or Parcel's plugin resolution.","wrong":"import PugPlugin from 'parcel-plugin-pug'","symbol":"PugPlugin","correct":"module.exports = require('parcel-plugin-pug')"}],"quickstart":{"code":"// Install Parcel v1 and plugin\nnpm install -D parcel-bundler@1 parcel-plugin-pug\n\n// Create index.pug:\ndoctype html\nhtml\n  head\n    title Parcel + Pug\n  body\n    h1 Hello World\n    p This is a Pug template bundled with Parcel.\n    img(src=\"image.jpg\" alt=\"test\")\n\n// Run:\n// npx parcel index.pug\n// Opens localhost:1234 with compiled HTML.","lang":"javascript","description":"Shows minimal setup with Parcel v1, including a .pug file with asset reference and build command."},"warnings":[{"fix":"Use Parcel v1 (parcel-bundler@^1.1.0) or migrate to Parcel v2's built-in Pug support.","message":"Parcel v2 is not supported; the plugin only works with Parcel v1.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Run npm install -D parcel-bundler@^1.0.0 in project.","message":"Plugin requires parcel-bundler as a peer dependency; missing it causes 'Cannot find module' error.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Upgrade to Parcel v2 and use its native Pug support or community alternatives.","message":"Parcel v1 itself is deprecated; consider migrating to Parcel v2.","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install -D parcel-bundler@^1.1.0","cause":"parcel-bundler peer dependency not installed","error":"Cannot find module 'parcel-bundler/src/Asset'"},{"fix":"Use parcel-bundler@1.12.3 or lower, or update plugin to v0.2.5+","cause":"Incompatible with newer Parcel v1 versions (after v1.12.3)","error":"asset.shouldInvalidate is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}