Skip to content

Instantly share code, notes, and snippets.

@opr
Created December 19, 2023 11:44
Show Gist options
  • Save opr/2405c1dc05b379763b6e008e98aab3a7 to your computer and use it in GitHub Desktop.
Save opr/2405c1dc05b379763b6e008e98aab3a7 to your computer and use it in GitHub Desktop.
const path = require( 'path' );
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
const WooCommerceDependencyExtractionWebpackPlugin = require( '@woocommerce/dependency-extraction-webpack-plugin' );
module.exports = {
...defaultConfig,
plugins: [
...defaultConfig.plugins.filter(
( plugin ) =>
plugin.constructor.name !== 'DependencyExtractionWebpackPlugin'
),
new WooCommerceDependencyExtractionWebpackPlugin(),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment