Hi I want to add a logo image to the navbar in vue application. I placed the logo image in src/assets and added code to home.vue like this:
<f7-nav-left><img src="../assets/logo.png"></f7-nav-left>
But image not shown.
Hi I want to add a logo image to the navbar in vue application. I placed the logo image in src/assets and added code to home.vue like this:
<f7-nav-left><img src="../assets/logo.png"></f7-nav-left>
But image not shown.
Hi Vladimir.
1- There is no any error in terminal
2- I inspected the image with chrome dev tools an I saw this line:
<img src="[object Module]">
Why this image is seen as an object?
Try to change webpack config url-loader
for images:
Change this:
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: 'images/[name].[ext]',
},
},
to this:
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: 'images/[name].[ext]',
esModule: false,
},
},