Webpack is the most advanced build tool for compiling assets.

In fact it's a new worldwide standart for building websites.

Moreover it providers realtime hot reloading to implement all the changes throughout all the scripts, styles, images and fonts assets immedeately.


Config files both for production and development modes are located into the main cogear package root:

├── bin
├── lib
├── node_modules
├── package.json
├── postcss.config.js
├── webpack.common.js  # <= Common config shared between production and development
├──     # <= Development config
└──    # <= Production config

All in all it's usual Webpack config. You can edit it in your project to customize Webpack behavior.

If you have some questions, please, take a closer look to the concepts in Webpack documentation.

Plug in

As you've noticed config files returns a function which accepts system instasnce as cogear argument.

This means that configs are called from inside the system build process.

You may use webpack.config event in your plugin to change the webpacks config.

// ./cogear-plugin-webpack-awesome/plugin.js
module.exports = {
            // Check mode
            if(cogear.mode == 'development){ 
                // Do whatever your need