Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 1813

Using js-post-build to rename custom files to page.js for NextJs Projects

$
0
0

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
fi

filename=“$1”

if [[ “$filename” == *“_Page.res.js”* ]]; then
mv “$filename” “page.res.js”
fi


Viewing all articles
Browse latest Browse all 1813

Trending Articles