bc998444a3
* Possibly use safe Text component * Possibly use safe navigation components * Add experimental package * Update components to import from woocommerce/experimental * Make experimental package private * Reference experimental package relatively * Update packages/experimental/README.md Co-authored-by: Paul Sealock <psealock@gmail.com> * Update packages/experimental/CHANGELOG.md Co-authored-by: Paul Sealock <psealock@gmail.com> * Update history state instead of mocking getQuery in tests * Handle PR feedback * Create excluded externals array and return early Co-authored-by: Paul Sealock <psealock@gmail.com> |
||
---|---|---|
.. | ||
src | ||
.npmrc | ||
CHANGELOG.md | ||
README.md | ||
package.json |
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/* |
wc['*'] |
wc-* |