woocommerce/plugins/woocommerce-admin/packages/dependency-extraction-webpa...
Paul Sealock 8709dd3682 add dewps request table 2020-11-17 15:57:18 +13:00
..
src New Package: DependencyExtractionWebpackPlugin (https://github.com/woocommerce/woocommerce-admin/pull/5198) 2020-10-15 09:50:57 +13:00
.npmrc New Package: DependencyExtractionWebpackPlugin (https://github.com/woocommerce/woocommerce-admin/pull/5198) 2020-10-15 09:50:57 +13:00
CHANGELOG.md version bump dewp 2020-11-16 15:34:47 +13:00
README.md add dewps request table 2020-11-17 15:57:18 +13:00
package.json version bump dewp 2020-11-16 15:34:47 +13:00

README.md

Dependency Extraction Webpack Plugin

Extends Wordpress Dependency Extraction Webpack Plugin to automatically include WooCommerce dependencies in addition to WordPress dependencies.

Installation

Install the module

npm install @woocommerce/dependency-extraction-webpack-plugin --save-dev

Usage

Use this as you would Dependency Extraction Webpack Plugin. The API is exactly the same, except that WooCommerce packages are also handled automatically.

// webpack.config.js
const WooCommerceDependencyExtractionWebpackPlugin = require( '@woocommerce/dependency-extraction-webpack-plugin' );

module.exports = {
	// …snip
	plugins: [ new WooCommerceDependencyExtractionWebpackPlugin() ],
};

Additional module requests on top of Wordpress Dependency Extraction Webpack Plugin are:

Request Global Script handle
@woocommerce/* wc['*'] wc-*