Fix double dot in generated font and image filenames (#9806)#10032
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe pull request fixes a bug where webpack was generating asset filenames with double dots (e.g., ChangesVersion 9.16 Release and Asset Filename Fix
🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
00a8938 to
7b5f269
Compare
Webpack 5 asset modules include the leading dot in the [ext] token, so the 'img/[name].[ext]' and 'fonts/[name].[ext]' templates produced filenames with a double dot (e.g. Roboto-Bold..ttf). Use '[name][ext]' so the emitted filenames are correct. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7b5f269 to
01c218a
Compare
There was a problem hiding this comment.
Pull request overview
Fixes the Webpack 5 asset-module filename templating to avoid double-dot filenames for generated images and fonts (addresses #9806), and documents the fix in the v9.16 release notes.
Changes:
- Update Webpack asset
generator.filenametemplates from[name].[ext]to[name][ext]for images and fonts. - Add a v9.16 release note entry referencing Issue #9806.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
web/webpack.config.js |
Adjusts asset-module filename templates to prevent double dots in emitted asset filenames. |
docs/en_US/release_notes_9_16.rst |
Adds a bug-fix release note entry documenting the resolved double-dot asset filename issue. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
asheshv
left a comment
There was a problem hiding this comment.
LGTM. Webpack 5's [ext] substitution token includes the leading dot, so [name].[ext] produced the .. doubling — [name][ext] is the canonical fix and matches what CopyPlugin at line 74 already does.
Generated artifacts in web/pgadmin/static/js/generated/ still carry the broken names in the repo but those regenerate via make bundle. Worth a quick CI check post-merge that the bundle output has clean single-dot filenames and no font 404s.
Summary
Fixes #9806.
Webpack 5 asset modules include the leading dot in the
[ext]token, so theimg/[name].[ext]andfonts/[name].[ext]generator templates emit filenames with a double dot (e.g.Roboto-Bold..ttf,fa-solid-900..woff2). This switches both templates to[name][ext], which produces the correct single-dot filenames.Changes
web/webpack.config.js:img/[name].[ext]→img/[name][ext],fonts/[name].[ext]→fonts/[name][ext]🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Bug Fixes
Documentation