
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@woocommerce/dependency-extraction-webpack-plugin
Advanced tools
WooCommerce Dependency Extraction Webpack Plugin
Extends Wordpress Dependency Extraction Webpack Plugin to automatically include WooCommerce dependencies in addition to WordPress dependencies.
Install the module
pnpm install @woocommerce/dependency-extraction-webpack-plugin --save-dev
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() ],
};
Note: If you plan to extend the webpack configuration from @wordpress/scripts
with WooCommerceDependencyExtractionWebpackPlugin
, be sure to remove the default instance of the plugin:
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
const webpackConfig = {
...defaultConfig,
plugins: [
...defaultConfig.plugins.filter(
( plugin ) =>
plugin.constructor.name !== 'DependencyExtractionWebpackPlugin'
),
new WooCommerceDependencyExtractionWebpackPlugin(),
],
};
Additional module requests on top of Wordpress Dependency Extraction Webpack Plugin are:
Request | Global | Script handle | Notes |
---|---|---|---|
@woocommerce/data | wc['data'] | wc-store-data | |
@woocommerce/csv-export | wc['csvExport'] | wc-csv | |
@woocommerce/blocks-registry | wc['wcBlocksRegistry'] | wc-blocks-registry | |
@woocommerce/block-data | wc['wcBlocksData'] | wc-blocks-data-store | This dependency does not have an associated npm package |
@woocommerce/settings | wc['wcSettings'] | wc-settings | |
@woocommerce/* | wc['*'] | wc-* |
An object can be passed to the constructor to customize the behavior, for example:
module.exports = {
plugins: [
new WooCommerceDependencyExtractionWebpackPlugin( {
bundledPackages: [ '@woocommerce/components' ],
} ),
],
};
bundledPackages
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.
FAQs
WooCommerce Dependency Extraction Webpack Plugin
The npm package @woocommerce/dependency-extraction-webpack-plugin receives a total of 1,748 weekly downloads. As such, @woocommerce/dependency-extraction-webpack-plugin popularity was classified as popular.
We found that @woocommerce/dependency-extraction-webpack-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.