How to dynamically include static assets when generating nuxt?
I am working on a static site using Nuxt.js (I am aiming at posting only the result nuxt generate
).
The content is generated based on the asyncData
json API call.
I want to grab some files and include them as if they were in a directory /static
, depending on the API response. How can this be achieved?
To better illustrate the problem: Let's say there is a list of invoices coming from the API, so on the resulting page I show the invoice information, but I also want to include the download link in the appropriate file (which I can work out knowing the API response).
Perhaps this task should be done outside of nuxt.js after the site has been generated?
source to share
No one has answered this question yet
Check out similar questions: