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?

+3
vuejs2 nuxt.js


source to share


No one has answered this question yet

Check out similar questions:

6
Dynamically get paths to images in folder with Nuxt
2
How to create 100% static site with Nuxt.js without API request?
1
Nuxt rendering static assets in localhost but not in production
1
Generating meta tags Vue / Nuxt async
0
Run nuxt on https locally - problem with nuxt.config.js
0
I want to load non-vue assets (json) generated by the server using webpack and vue
0
Nuxt template generates static assets by default twice as much Vuejs
0
How can we keep a user logged in when the access token expires and we need to log in again to continue as a normal user
0
How to make smooth scrolling in nuxt.js and loading site?
0
How do I add headers in response to static Nuxt files?



All Articles
Loading...
X
Show
Funny
Dev
Pics