Webpack / Spark wrong image paths
Since my upgrade the original installation of Spark was pushing via gulp/elixir images into the img folder. I will admit I'm not really experienced in webpack at all so this is very confusing to me.
I have images inside the resources/assets/img folder and I link to them with ../img/ in both less files and URL::asset('img/imagefile.jpg') and when I compile with npm run dev webpack runs and moves only some images into the images folder inside public instead of img and not all of them.
It's all so confusing to me. Here's what my webpack.mix.js looks like
let mix = require('laravel-mix');
let path = require('path');
let BrowserSyncPlugin = require('browser-sync-webpack-plugin');
mix.less('resources/assets/less/app.less', 'public/css')
.copy('node_modules/sweetalert/dist/sweetalert.min.js', 'public/js/sweetalert.min.js')
.copy('node_modules/sweetalert/dist/sweetalert.css', 'public/css/sweetalert.css')
.js('resources/assets/js/app.js', 'public/js')
.webpackConfig({
plugins: [
new BrowserSyncPlugin({
proxy: "designpresto.app",
files: ['**/*.css', '**/*.js', '**/*.php'],
}, {reload: false})
],
resolve: {
modules: [
path.resolve(__dirname, 'vendor/laravel/spark/resources/assets/js'),
'node_modules'
],
alias: {
'vue$': 'vue/dist/vue.js'
}
}
});
If someone can give me a hint what's going on I would appreciate it. Thanks.
Please or to participate in this conversation.