3.1.0 • Published 10 months ago

@woocommerce/dependency-extraction-webpack-plugin v3.1.0

Weekly downloads
404
License
GPL-2.0-or-later
Repository
github
Last release
10 months ago

Dependency Extraction Webpack Plugin

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

Installation

Install the module

pnpm 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:

RequestGlobalScript handleNotes
@woocommerce/datawc['data']wc-store-data
@woocommerce/csv-exportwc['csvExport']wc-csv
@woocommerce/blocks-registrywc['wcBlocksRegistry']wc-blocks-registry
@woocommerce/block-datawc['wcBlocksData']wc-blocks-data-storeThis dependency does not have an associated npm package
@woocommerce/settingswc['wcSettings']wc-settings
@woocommerce/*wc['*']wc-*

Options

An object can be passed to the constructor to customize the behavior, for example:

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.

3.1.0

10 months ago

3.0.1

1 year ago

3.0.0

1 year ago

2.4.0

2 years ago

2.3.0

2 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

4 years ago

1.7.0

4 years ago

1.6.0

4 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago