Extends Wordpress [Dependency Extraction Webpack Plugin](https://github.com/WordPress/gutenberg/tree/master/packages/dependency-extraction-webpack-plugin) to automatically include WooCommerce dependencies in addition to WordPress dependencies.
Use this as you would [Dependency Extraction Webpack Plugin](https://github.com/WordPress/gutenberg/tree/master/packages/dependency-extraction-webpack-plugin). The API is exactly the same, except that WooCommerce packages are also handled automatically.
Additional module requests on top of Wordpress [Dependency Extraction Webpack Plugin](https://github.com/WordPress/gutenberg/tree/master/packages/dependency-extraction-webpack-plugin) are:
An object can be passed to the constructor to customize the behavior, for example:
```js
module.exports = {
plugins: [
new WooCommerceDependencyExtractionWebpackPlugin( {
bundledPackages: [ '@woocommerce/components' ],
} ),
],
};
```
##### `bundledPackages`
- Type: array
- Default: []
A list of potential WooCommerce excluded packages, this will include the excluded package within the bundle (example above).
For more supported options see the original [dependency extraction plugin](https://github.com/WordPress/gutenberg/blob/trunk/packages/dependency-extraction-webpack-plugin/README.md#options).