Skip to content

Replace pug-plugin with a small pug loader, update all dependencies - #35

Merged
ihsoyCT merged 1 commit into
masterfrom
chore/drop-pug-plugin
Oct 30, 2026
Merged

ihsoyCT merged 1 commit into
masterfrom
chore/drop-pug-plugin

Conversation

@ihsoyCT

@ihsoyCT ihsoyCT commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Why

pug-plugin wraps html-bundler-webpack-plugin, a whole-site bundler (HTML entries, assets, CSS). This project only uses it to turn the five .pug templates into JS functions; the HTML pages in dist/ are hand-written. html-bundler-webpack-plugin requires webpack's internal webpack/lib/Cache, which webpack 5.112 moved, so it blocked every webpack update (#34 failed on it).

What

Verified

  • All 5 templates rendered with test data (HTML-escaping cases, images on/off, previews/thumbnail) via the old and new build: identical, except && in the static onchange attribute of the two search forms is now && (standard pug escaping that html-bundler deliberately undid). The browser parses both to the same attribute value.
  • Clean checkout, npm ci && npm run build:prod: succeeds, output identical to the committed dist/.
  • npm run start:dev (webpack-dev-server 6) starts and serves /, /index.js, /about.html and history-fallback URLs.

🤖 Generated with Claude Code

pug-plugin is a wrapper around html-bundler-webpack-plugin, which
builds whole sites (HTML entries, assets, CSS). This project only uses
it to turn five .pug templates into JS functions; the HTML pages in
dist/ are written by hand. html-bundler-webpack-plugin requires
webpack's internal 'webpack/lib/Cache', which webpack 5.112 moved, so
it blocked every webpack update (Dependabot #34 failed on it).

pug-loader.js does the same with pug.compileClient (pug was already a
dependency). doctype "html" matches the old output (<img>, not <img/>).
Rendered all templates with test data before and after: identical,
except that '&&' in the static onchange attribute of the two search
forms is now written as '&amp;&amp;', standard pug escaping that
html-bundler undid; the browser parses both to the same attribute.

Dependencies: webpack 5.112.2, webpack-cli 7, webpack-dev-server 6,
everything else updated within range (axios 1.21.0, +7 KB in the
bundle). npm audit: 0 vulnerabilities; fixes the open alerts for
shell-quote, follow-redirects, qs and uuid (Dependabot #30, #32-#34).
webpack-cli 7 needs Node >= 20.9 and webpack-dev-server 6 >= 22.15, so
the CI matrix is now Node 22 and 24 (18 and 20 are end of life).

Deploy workflow: when the built site did not change (e.g. a dev-only
dependency bump) the step now ends successfully instead of failing on
'nothing to commit'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ihsoyCT
ihsoyCT merged commit 3453bd7 into master Oct 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant