woocommerce/plugins/woocommerce-admin/packages/dependency-extraction-webpa...
Darren Ethier 4cd14f5137 Fixes for @woocommerce/dependency-extraction-webpack-plugin (https://github.com/woocommerce/woocommerce-admin/pull/6295)
* switch block-settings alias to settings and fix mapped external

* don’t force compilation of externals to `this` scope.

* update various meta data in package related files (changelog etc)

* update starter pack

Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-02-10 12:55:38 +13:00
..
assets Dependency Extraction Webpack Plugin: Add Woo Blocks packages (https://github.com/woocommerce/woocommerce-admin/pull/6228) 2021-02-04 17:43:24 +13:00
src Fixes for @woocommerce/dependency-extraction-webpack-plugin (https://github.com/woocommerce/woocommerce-admin/pull/6295) 2021-02-10 12:55:38 +13:00
.npmrc New Package: DependencyExtractionWebpackPlugin (https://github.com/woocommerce/woocommerce-admin/pull/5198) 2020-10-15 09:50:57 +13:00
CHANGELOG.md Fixes for @woocommerce/dependency-extraction-webpack-plugin (https://github.com/woocommerce/woocommerce-admin/pull/6295) 2021-02-10 12:55:38 +13:00
README.md Fixes for @woocommerce/dependency-extraction-webpack-plugin (https://github.com/woocommerce/woocommerce-admin/pull/6295) 2021-02-10 12:55:38 +13:00
package.json Fixes for @woocommerce/dependency-extraction-webpack-plugin (https://github.com/woocommerce/woocommerce-admin/pull/6295) 2021-02-10 12:55:38 +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/data wc['data'] wc-store-data
@woocommerce/csv-export wc['csvExport'] wc-csv
@woocommerce/blocks-registry wc['wcBlocksRegistry'] wc-blocks-registry
@woocommerce/settings wc['wcSettings'] wc-settings
@woocommerce/* wc['*'] wc-*