Open djfarrelly opened 5 years ago
@djfarrelly, one potential issue with this is, if someone uploads 2 files with the same name, one from the root dire ./
and the other from ./public
, it will result in conflicting keys. That's a edge case those and shouldn't happen.
Usually the files in the root dir are gulp generated files. We could share a good practice to generate those files in a specific directory ./build
for instance, and never upload files from the root directory :)
Good call @philippemiguet, that will likely be another check we should add in a function like EnsureUniqueKeys
that throws and error if there are duplicates.
Purpose
Inspired by the discussion in this PR, we can remove the shared directory prefix to allow for cleaner manifests and easier usage. This would make the
@bufferapp/static-assets
library simpler and custom solutions to be cleaner as well.Idea
Given a generated manifest:
It would become:
Since most apps are never referencing
./public
in their code, it makes sense to remove it, potentially by default. To do this we could:public
as a prefix directory