You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.min.js.map files not excluded in make-pot, causing .min.js to be parsed and leading to memory issues #449
The make-pot command attempts to parse .min.js files even though they are explicitly listed in the excluded patterns (*.min.js). This happens when the corresponding .min.js.map files are present in the same directory.
In --debug mode, the log misleadingly shows that .min.js files are being parsed. However, the actual culprit appears to be the .min.js.map files. This can cause unnecessary processing and even memory exhaustion issues in large codebases with many .min.js and .min.js.map files.
Describe how other contributors can replicate this bug
Create a build directory with a .min.js file and its corresponding .min.js.map file.
Run the wp i18n make-pot command on the directory with --debug enabled.
Observe the debug output showing .min.js being parsed despite being excluded.
In larger projects, this may lead to memory exhaustion or long processing times.
Describe what you would expect as the correct outcome
Ideally, .min.js.map files should also be excluded from parsing just like .min.js.
At the very least, the debug output should clearly state when .map files are being parsed, to aid troubleshooting.
Provide a possible solution
Update the exclusion list to also include *.min.js.map or .map.
The message is a bit misleading / incorrect. To clarify: wp i18n make-pot parses *.js.map files on purpose to get translations with correct source information. It does not actually parse your .min.js file (again, the message is incorrect). We do not want to exclude .js.map files.
Activity
swissspidy commentedon Jul 25, 2025
Thanks for your report.
The message is a bit misleading / incorrect. To clarify:
wp i18n make-potparses*.js.mapfiles on purpose to get translations with correct source information. It does not actually parse your.min.jsfile (again, the message is incorrect). We do not want to exclude.js.mapfiles.