6.23.0 • Published 12 months ago

@popup-maker/dependency-extraction-webpack-plugin v6.23.0

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

Dependency Extraction Webpack Plugin

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

Installation

Install the module

pnpm install @popup-maker/dependency-extraction-webpack-plugin --save-dev

Usage

Use this as you would Dependency Extraction Webpack Plugin. The API is exactly the same, except that Popup Maker packages are also handled automatically.

// webpack.config.js
const PopupMakerDependencyExtractionWebpackPlugin = require( '@popup-maker/dependency-extraction-webpack-plugin' );

module.exports = {
 // …snip
 plugins: [ new PopupMakerDependencyExtractionWebpackPlugin() ],
};

Additional module requests on top of Wordpress Dependency Extraction Webpack Plugin are:

RequestGlobalScript handleNotes
@popup-maker/*popupMaker['*']popup-maker-*

Options

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

module.exports = {
 plugins: [
  new PopupMakerDependencyExtractionWebpackPlugin( {
   bundledPackages: [ '@popup-maker/components' ],
  } ),
 ],
};

bundledPackages

  • Type: array
  • Default: []

A list of potential Popup Maker excluded packages, this will include the excluded package within the bundle (example above).

For more supported options see the original dependency extraction plugin.

6.23.0

12 months ago

5.9.1

1 year ago

5.9.0

1 year ago