3.0.1 • Published 2 days ago

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

Weekly downloads
404
License
GPL-2.0-or-later
Repository
github
Last release
2 days 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.0.1

2 days ago

3.0.0

15 days ago

2.4.0

21 days ago

2.3.0

6 months ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago