An update, noticed this problem is happening only on windows. I tried this in wsl and masOS and it was working fine.
And the script to rename the file to page.res.js:
#!/ bin/bash
#Check if the filename is provided
if [ -z “$1” ]; then
echo “Usage: $0 <filename>”
exit 1
fifilename=“$1”
if [[ “$filename” == *“_Page.res.js”* ]]; then
mv “$filename” “page.res.js”
fi