ndabAP / vue-sails-example

NOT MAINTAINED Vue.js with Sails.js example project with many features

Home Page:https://vue-sails-example.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image path changes after build

zimudec opened this issue · comments

I saw that in frontend the correct path where the images are inserted, is the folder "static", therefore, the url to the img would be for example "/static/img.jpg" (I do not know if it is the best practice). The problem is that when you build to production, the images go to the "assets" folder in "backend", so the route changes to "/assets/img.jpg" and all the previous links are broken.

One solution that I implemented is that for the origin "/static", the destination is
"/backend/static", and it works, but I do not know if it's the best practice.

This is not visible to the naked eye, because the heroku raised example has no images.

Thanks for your report. I wanted to add real images anyway.