Repository navigation
Replace pug-plugin with a small pug loader, update all dependencies - #35
Merged
Merged
Conversation
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 '&&', 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>
This was referenced Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
pug-pluginwrapshtml-bundler-webpack-plugin, a whole-site bundler (HTML entries, assets, CSS). This project only uses it to turn the five.pugtemplates into JS functions; the HTML pages indist/are hand-written.html-bundler-webpack-pluginrequires webpack's internalwebpack/lib/Cache, which webpack 5.112 moved, so it blocked every webpack update (#34 failed on it).What
pug-loader.js(12 lines) compiles templates withpug.compileClient(pugwas already a dependency).pug-pluginandhtml-bundler-webpack-pluginare removed (−59 packages).npm audit: 0 vulnerabilities. Covers the open security alerts and Dependabot PRs for shell-quote (critical), follow-redirects, qs and uuid: supersedes Bump qs from 6.16.0 to 6.16.2 #30, Bump follow-redirects from 1.16.0 to 1.16.2 #32, Bump shell-quote from 1.10.0 to 1.12.0 #33, Bump uuid and webpack-dev-server #34.nothing to commit.Verified
&&in the staticonchangeattribute of the two search forms is now&&(standard pug escaping that html-bundler deliberately undid). The browser parses both to the same attribute value.npm ci && npm run build:prod: succeeds, output identical to the committeddist/.npm run start:dev(webpack-dev-server 6) starts and serves/,/index.js,/about.htmland history-fallback URLs.🤖 Generated with Claude Code