Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash-webpack-plugin

Package Overview
Dependencies
Maintainers
4
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash-webpack-plugin

Smaller modular Lodash builds.

  • 0.11.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created

What is lodash-webpack-plugin?

The lodash-webpack-plugin is a plugin for Webpack that allows you to cherry-pick Lodash modules to include in your build, which can significantly reduce the size of your final bundle. It provides granular control over which Lodash functions are included, optimizing the build process and improving performance.

What are lodash-webpack-plugin's main functionalities?

Cherry-picking Lodash functions

This feature allows you to include only specific Lodash functions in your Webpack build. In this example, only the 'collections' and 'paths' functions from Lodash are included, reducing the bundle size.

const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');

module.exports = {
  plugins: [
    new LodashModuleReplacementPlugin({
      'collections': true,
      'paths': true
    })
  ]
};

Customizing Lodash builds

This feature allows you to customize your Lodash build by enabling or disabling specific features. In this example, 'shorthands' and 'cloning' features are enabled, allowing for more efficient builds.

const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');

module.exports = {
  plugins: [
    new LodashModuleReplacementPlugin({
      'shorthands': true,
      'cloning': true
    })
  ]
};

Disabling specific Lodash features

This feature allows you to disable specific Lodash features that you do not need. In this example, 'caching' and 'deburring' features are disabled, further reducing the bundle size.

const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');

module.exports = {
  plugins: [
    new LodashModuleReplacementPlugin({
      'caching': false,
      'deburring': false
    })
  ]
};

Other packages similar to lodash-webpack-plugin

Keywords

FAQs

Package last updated on 19 Dec 2020

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc