Corrupted files in bundled theme.
Describe the bug WPRig 3.0.1 - 3.0.2 corrupts files on bundle.
To Reproduce Steps to reproduce the behavior:
- Download lates version or WPRig and "npm run rig-init"
- Go to bundled "wp-rig-test" theme folder
- Try to open screenshot.png in the root
- See that it's corrupted
Expected behavior Files should be copied to bundled theme "as it is", without any changes and not being corrupted.
Desktop (please complete the following information):
- Windows 11 Pro 24H2
Additional context Same happens with additional files to copy (e.g. create custom folder with video or fonts in assets and try to copy it to bundle, it also appears corrupted). But text files like readme or license which also copied as separate files are not corrupted. Seems it happens only with graphics.
I was able to fix it without relying on pump. It's probably something with streams or how Gulp works with them in new version
Here is a quick solution for prodPred.js file (attached as .txt)
Due to its a "quickfix" I haven't opened pull request. I hope there should be another, more optimal solution and someone from contributors can fix it saving native logic.
It was found that WPRIg brokes only files which are the part of filesToCopy list in theme config file e.g. screenshot.png in the root of theme, custom fonts and videos which have been added in by me in my custom wprig theme.
I fixes it by changing the logic of copying these files without any minification and opened pull request: https://github.com/wprig/wprig/pull/882