Track changes in public_output_path during compilation
thedanbob opened this issue · 3 comments
Desired behavior:
If public_output_path
is changed and the current set of precompiled files are manually moved to the new location, shakapacker:compile
should do a compilation to generate a new manifest.json.
Actual behavior:
Since the files exist where Shakapacker expects them and their hashes haven't changed, compilation is skipped. The outdated manifest.json causes the *_pack_tag helpers to generate incorrect URLs.
I'll admit this is a pretty niche issue and probably user error, but it's bitten me a couple of times and should be trivial to fix by just mixing that config values into the watched_files_digest
. If I create a PR would you be interested?
If you're manually moving the files, then why not manually update the manifest.json?
That would be the correct thing to do, but the first time it happened I wasn't really aware of manifest.json and ended up fixing the problem accidentally by just deleting the whole output directory. The next time I dug into things and realized what was going on. Maybe it's just a me problem, but I can at least imagine it happening to someone else.
I close this issue. Feel free to comment if we need to discuss it further.