Can't load static files inside Vue.js component -
i have component login.vue , inside template paste
<img src="logo.png">
the catalog structure same here: https://vuejs-templates.github.io/webpack/static.html
i got static folder inside src folder.
i try many diffrent combinations like
<img src="src/assets/logo.png"> <img src="assets/logo.png">
when try write dot prefix (absolute path)
<img src="./src/assets/logo.png">
i got , error babel compiler: module not found: error: can't resolve './logo.png'
you can put images /static
folder , use them src="/static/[filename]"
(use absolute path).
static folder not processed webpack.
Comments
Post a Comment