cra-build-watch
cra-build-watch copied to clipboard
[BUG] When providing `-b` arg, the folder is not completely rebuilt, but copied in to.
When providing a build path with -b
, the path does not get cleared as it does when the argument is omitted.
The asset-manifest
is deleted and re-created so there is no risk (read very little, there is always a risk 😉) of a build using the wrong files so expected current impact of the bug is minimal.
Examples;
Running with -b
arg
cra-build-watch -b dist/ --chunk-filename './test_1/[name].[hash].js'
cra-build-watch -b dist/ --chunk-filename './test_2/[name].[hash].js'
+---dist
| | asset-manifest.json
| | favicon.ico
| | index.html
| | manifest.json
| |
| +---js
| | bundle.js
| | bundle.js.map
| |
| +---test_1
| | 0.04b6ae9291b3834ef72a.js
| | 0.04b6ae9291b3834ef72a.js.map
| | main.04b6ae9291b3834ef72a.js
| | main.04b6ae9291b3834ef72a.js.map
| |
| \---test_2
| 0.04b6ae9291b3834ef72a.js
| 0.04b6ae9291b3834ef72a.js.map
| main.04b6ae9291b3834ef72a.js
| main.04b6ae9291b3834ef72a.js.map
Running without -b
arg
cra-build-watch --chunk-filename './test_1/[name].[hash].js'
cra-build-watch --chunk-filename './test_2/[name].[hash].js'
+---build
| | asset-manifest.json
| | favicon.ico
| | index.html
| | manifest.json
| |
| +---js
| | bundle.js
| | bundle.js.map
| |
| \---test_2
| 0.04b6ae9291b3834ef72a.js
| 0.04b6ae9291b3834ef72a.js.map
| main.04b6ae9291b3834ef72a.js
| main.04b6ae9291b3834ef72a.js.map
Thanks for the detailed issue. :+1:
Hum interesting indeed. I haven't had the time to reproduce it yet on Linux but there definitely seems to be a bug on your environment at least.
Sorry I don't have time to maintain this project anymore so I'll archive it and add a note in the README. Feel free to fork it as you see fit.