Custom Webpack Configuration: Custom Configuration Files

  • If you would like to completely customize your Webpack configuration, copy the node_modules/laravel-mix/setup/webpack.config.js file to your project's root directory.
  • Next, point all of the --config references in your package.json file to the newly copied configuration file.
  • If you choose to take this approach to customization, any future upstream updates to Mix's webpack.config.js must be manually merged into your customized file.

Related concepts

Custom Webpack Configuration: Custom Configuration Files — Structure map

Clickable & Draggable!

Custom Webpack Configuration: Custom Configuration Files — Related pages: