Custom Worker uses the BUILD_ID as hash even if the content of the custom worker has not changed.
Versions
next-pwa: 5.6.0
next: 13.3.4
How To Reproduce
In order to further improve cache asset handling, the custom worker hash should only change if the worker itself had a change in content. The BUILD_ID is currently used as hash, and a new worker-*.js (with a modified hash) is created for each prod build. This is counterproductive for cache handling, since the content of the file has not changed. In our project we use a relatively static custom worker that rarely changes.
Expected Behaviors
The custom worker hash should only change if the content of the custom worker has also changed.
Summary
Custom Worker uses the
BUILD_ID
as hash even if the content of the custom worker has not changed.Versions
next-pwa
: 5.6.0next
: 13.3.4How To Reproduce
In order to further improve cache asset handling, the custom worker hash should only change if the worker itself had a change in content. The
BUILD_ID
is currently used as hash, and a newworker-*.js
(with a modified hash) is created for each prod build. This is counterproductive for cache handling, since the content of the file has not changed. In our project we use a relatively static custom worker that rarely changes.Expected Behaviors
The custom worker hash should only change if the content of the custom worker has also changed.