Open mokkabonna opened 1 year ago
I ended up working around this with a custom plugin which copies the file where it needs to be during hydrate.
module.exports = {
hydrate: {
copy: async ({ arc, inventory, copy }) => {
await copy({
source: "./public/static.json",
target:
"@architect/shared/static.json",
});
},
},
};
I was also encountering this issue together with the typescript plugin. I suspect the problem is that with typescript esbuild bundles the whole function but the static
sill tries to look up the static.json
on the file system
Steps to reproduce Steps to reproduce the behavior:
Expected behavior Expect the static helper to get the fingerprinted path. It does not. it only get the non fingerprinted path.
Seems this is the problem: Why does the code look here(node_modules folder) https://github.com/architect/functions/blob/main/src/static/index.js#L18 for the manifest? While the file is written to /public/static.json? https://github.com/architect/deploy/blob/main/src/static/publish/write-static-manifest.js#L11
@architect/functions 5.2.3 @architect/architect 10.7.1