How to include webpack plugins when using Laravel Mix?
问题 How should I include webpack plugins if I use WebPack AND Laravel Mix? I am confused which file I add the plugin code into. My below attempt doesn't seem to be running my plugin. The plugin should be compressing the js, css files but its not. webpack.config.js : require('./node_modules/laravel-mix/src/index'); require(Mix.paths.mix()); // My plugin is here const CompressionPlugin = require('compression-webpack-plugin'); Mix.dispatch('init', Mix); let WebpackConfig = require('./node_modules