i have a project with webpack and vue.js. When i add image in vue template with src like '/images/imageName.png', browser throw me error 404. How do I configure it so that it sees absolute paths?
I have this root path:
../public
- myProject
-- webpack.config.js
-- src
--- app.vue
--- app.js
-- images
--- some folders with images
in Vue template i use src with absolute path:
<img src="/images/apps/small-logo/android-text-logo.png" alt="img">
output: {
path: path.resolve(__dirname, '../../public'),
publicPath: '/',
filename: '[name].js'
},
test: /\.(png|jpg|svg)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[path][name].[ext]'
}
}
]