Update Webpack Config

Chain Webpack

// poi.config.js
module.exports = {
  chainWebpack(config, context) {
    // Do something..
  }
}
  • config: webpack-chain instance
  • context
    • type: Default toclient
    • command: Current running command, builddeveloptest etc.

Configure Webpack

// poi.config.js
module.exports = {
  configureWebpack(config, context) {
    // Do something like adding a plugin
    config.plugins.push(new BundleAnalyzerPlugin())
    // optionally return config
  }
}