refactor(assets): align dist filenames with webpack manifest#488
Open
firestar300 wants to merge 6 commits intomasterfrom
Open
refactor(assets): align dist filenames with webpack manifest#488firestar300 wants to merge 6 commits intomasterfrom
firestar300 wants to merge 6 commits intomasterfrom
Conversation
Contributor
|
TODO : ICI : https://github.com/BeAPI/wp-skeleton/wiki/06-Th%C3%A8mes#la-constante-script_debug |
- Use stable output names in production (app.js, [name].css) and same MiniCssExtract + WebpackManifestPlugin in all modes. - Register theme JS/CSS from assets.json only; remove is_minified() and SCRIPT_DEBUG-based branching. - Fix get_asset_data() static cache to key by the requested filename. - Update PHPDoc and inline comments to match the new flow.
Add empty-file check, dist/login.css fallback, and pass through filter default to avoid invalid dist/ URL when get_min_file returns empty.
d2775dc to
c287362
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c287362. Configure here.
Contributor
Author
C'est modifié. ✅ |
francoistibo
approved these changes
Apr 30, 2026
ptesei
approved these changes
May 3, 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.

Note
Medium Risk
Touches build outputs and runtime asset URL resolution; a mismatch between webpack manifest entries and expected keys could break script/style loading in production.
Overview
Build output is changed to use stable production filenames (
[name].js,[name].css) and to always emitdist/assets.jsonviaWebpackManifestPlugin, withMiniCssExtractPluginconfigured consistently across modes.Theme PHP asset resolution is refactored to rely on
assets.jsonfor JS/CSS/editor/login filenames (falling back toapp.js/app.css/login.csswhen missing), removesis_minified()/SCRIPT_DEBUGbranching, fixesget_asset_data()caching to key by the requested filename, and updatesstylesheet_uri/login CSS filters accordingly.Reviewed by Cursor Bugbot for commit 1b44a96. Bugbot is set up for automated code reviews on this repo. Configure here.