0👍
Found it:
#1 Create an alias in webpack.config.js. Add this '@assets': path.resolve(__dirname, 'public')
line of code.
webpack.config.js
const path = require('path');
module.exports = {
resolve: {
alias: {
'@': path.resolve('resources/js'),
'@assets': path.resolve(__dirname, 'public')
},
},
};
#2 Load config to webpack.mix.js. Add these lines of code:
const webpackConfig = require('./webpack.config');
mix.webpackConfig(webpackConfig);
#3 Use the alias
<img src='@assets/images/3379.svg' alt="computer"/>
- [Vuejs]-How to set mode: 'open' when creating a shadow element using vue-custom-element
- [Vuejs]-Dynamically create html table from an Array
Source:stackexchange.com