Shedros's avatar

Change standard autoprefixer options because of wrong path of css images

Hi,

the mix standard webpack.config.js I found the following:

new webpack.LoaderOptionsPlugin({
    minimize: Mix.inProduction,
    options: {
        postcss: [
            require('autoprefixer')
        ],
        context: __dirname,
        output: { path: './' }
    }
})

Is there a way to change it in my webpack.mix.js? Because I want output: { path: './' } to be output: { path: '../' }. Or do I have to copy the weback.config.js to my project and change it there?

P.S. I want to change it because my CSS file gets copied via .sass('resources/assets/sass/app.scss', 'public/css') into my public/css folder. But the referenced images get copied into public and not into public/css. I have manually copy them into public/css via mix.copy('public/*.png', 'public/css'); to get the css working. I want to skip this step. If there is a way to correctly copy all images to public/css this also would be fine.

0 likes
1 reply
Shedros's avatar

I'm sorry to answer my own post, but does anybody have a solution for this?

Please or to participate in this conversation.