begin-community icon indicating copy to clipboard operation
begin-community copied to clipboard

If build step modifies static assets static.json in shared folder does not get updated

Open ryanbethel opened this issue 3 years ago • 0 comments

Expected behavior @brianleroux @ryanblock If fingerprint true, @shared is used, and static assets are added during build step a new static.json should be generated in the shared folder so that arc.static() will work correctly.

Description of bug It appears that the static.json in shared folder is generated based on contents of the public folder prior to the build step and then if those assets are changed it is stale when deployed. A related bug was recently fixed so that the static.json in the public folder does get updated but the one in the shared folder does not.

Steps to reproduce Here is a simple repo to reproduce: https://github.com/ryanbethel/node-static-test Here is a deployed version of that: https://play-2tn-staging.begin.app/alwayshere shows behavior for asset that is there prior to build. https://play-2tn-staging.begin.app/atbuild shows behavior for asset that is generated during the build process.

Additional context or notes There is a related issue or maybe a bug with the shared folder in this situation. If fingerprinting is used the @shared must be used for arc.static to work. Maybe a warning should be shown while validating the arc manifest. Also if @shared is only used for this purpose the shared folder will be empty and my not be present in git. In this case Begin could warn or recommend adding a .keep so that the folder exists.

ryanbethel avatar Jul 13 '21 17:07 ryanbethel