How to serve cdn links for assets in NuxtJS?
问题 I am working on a NUXTJs to create server side rendered website. My question is that although there is a assets/static folder in nuxt project structure to serve images & static files, i want to set cdn link for all my image source. What would be the best approach to do that? Possible ways I can think of: Vuex Store - set baseURL for the images and then use in components env - use environment variable to set the cdn URL TIA 回答1: You can set it via publicPath property in nuxt.config export