Writing Elixir Extensions
mergeConfig
mergeConfig
Occasionally you will need to extend Webpack in ways not supported by ColdBox Elixir. In these moments, you can provide your own configuration using the mergeConfig
method.
The mergeConfig
method will merge the object provided with the existing Webpack config using the excellent webpack-merge
library.
Custom Ingredients
Ingredients are the name for the methods available on the mix
object. You can add an ingredient to your Elixir instance like so:
The main use cases for using an ingredient over custom config are:
Need to call multiple times each time for different file(s)
Want to re-use across projects
Especially in the second case, feel free to publish the ingredient on NPM if you feel it could be useful to other developers.
Last updated