Question

App platform - backend component needs manifest from frontend

Posted August 12, 2021 101 views
Vue.js

I have a Vue 3 app, built with vite, and a node backend.

I’m trying to deploy to App Platform, using a static site for the frontend assets, and a service for the backend.

When vite builds the frontend js and css assets, they get a unique hash as part of the filename. The build process also creates a manifest.json with theses hashes, which the backend can load in order to generate the <script> and <link> tags.

Because the components (static site, service) are isolated from each other, the only way I can think to load the manifest is to make an HTTP GET to the static site. Seems over complicated. Is there an easier way?

It is possible to turn off these hashes and have predictable file names, but then you lose the cache-busting benefits, right?

Thanks

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!