Socket
Book a DemoInstallSign in
Socket

@gravityforms/dependency-extraction-webpack-plugin

Package Overview
Dependencies
Maintainers
11
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gravityforms/dependency-extraction-webpack-plugin

Dependency extraction webpack plugin for use in Gravity Forms development. Extends the WordPress plugin.

5.8.5
latest
Source
npmnpm
Version published
Maintainers
11
Created
Source

Gravity Forms Dependency Extraction Webpack Plugin

This plugin enhances the WordPress Dependency Extraction Webpack Plugin by adding automatic inclusion of Gravity Forms dependencies alongside WordPress dependencies. Use this if you are developing features or add-ons that extend Gravity Forms and want to use our externals instead of bundling our code yourselves. This is also used by the Gravity Forms plugin itself.

Installation

To install the module, use the following command:

npm install @gravityforms/dependency-extraction-webpack-plugin --save-dev

Usage

Integrate this plugin just like you would with the Dependency Extraction Webpack Plugin. The API remains identical, except for a few custom options we have added listed below, but it now also processes Gravity Forms packages automatically.

const GravityFormsDependencyExtractionWebpackPlugin = require('@gravityforms/dependency-extraction-webpack-plugin');

module.exports = {
  // other webpack config
  plugins: [new GravityFormsDependencyExtractionWebpackPlugin()],
};

Options

You can pass an object to the constructor to modify the plugin's behavior, for instance:

module.exports = {
  plugins: [
    new GravityFormsDependencyExtractionWebpackPlugin({
      bundledPackages: ['@gravityforms/libraries'],
    }),
  ],
};

bundledPackages

  • Type: array
  • Default: []

This option specifies an array of packages to ignore during externals mapping. These packages will be included within your bundle and not mapped to the external.

An important note on our @gravityforms/components package. If you pass @gravityforms/components here, it will exclude all the components, but you can also pass @gravityforms/components/react/admin/modules/Dialog to only exclude the Dialog component. This could be useful if you want to use a version of the package that has that component in a state that is ahead of what core has shipped with. All other components will map to our externals, but this one will be included in the bundle.

rootNamespace

  • Type: string
  • Default: 'gform'

If you are using our components by enqueuing the compiled files yourself instead of using the ones enqueued by Gravity Forms, you need to set this option to the same one you used in that package. Check the components readme for more details.

For more configuration options, refer to the original dependency extraction plugin.

Keywords

gravityforms

FAQs

Package last updated on 03 Sep 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.