martybalandis's avatar

how to extend mix.webpackConfig synchronously?

I have this basic code that when used, cleans up assets folder in the public directory. It can be useful if I want to delete junk from there and do a clean compile.

const clean = require('clean-webpack-plugin');
mix.webpackConfig({
    plugins: [
        new clean(['public/assets'], {verbose: false})
    ],
})

It works fine but on its own, however, I do have lot's of copy and sass and js that are run asynchronously and what happens is it does some copy first and THEN deletes. I want it to set up that when i run it i would have a choice to delete everything and THEN run the rest.

0 likes
0 replies

Please or to participate in this conversation.