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

gatsby-plugin-lodash

Package Overview
Dependencies
Maintainers
1
Versions
320
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-lodash - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

31

gatsby-node.js

@@ -12,8 +12,31 @@ "use strict";

// Add Lodash webpack plugin
exports.modifyWebpackConfig = function (_ref) {
exports.modifyWebpackConfig = function (_ref, _ref2) {
var config = _ref.config,
stage = _ref.stage;
var disabledFeatures = _ref2.disabledFeatures;
if (stage === `build-javascript`) {
config.plugin(`Lodash`, webpackLodashPlugin, null);
var features = {
shorthands: true,
cloning: true,
currying: true,
caching: true,
collections: true,
exotics: true,
guards: true,
metadata: true,
deburring: true,
unicode: true,
chaining: true,
memoizing: true,
coercions: true,
flattening: true,
paths: true,
placeholders: true
};
disabledFeatures.forEach(function (feature) {
delete features[feature];
});
config.plugin(`Lodash`, webpackLodashPlugin, features);
}

@@ -25,4 +48,4 @@

// Add Lodash Babel plugin
exports.modifyBabelrc = function (_ref2) {
var babelrc = _ref2.babelrc;
exports.modifyBabelrc = function (_ref3) {
var babelrc = _ref3.babelrc;

@@ -29,0 +52,0 @@ return (0, _extends3.default)({}, babelrc, {

2

package.json
{
"name": "gatsby-plugin-lodash",
"version": "1.0.2",
"version": "1.0.3",
"description": "Easy modular Lodash builds. Adds the Lodash webpack & Babel plugins to your Gatsby build",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -19,1 +19,13 @@ # gatsby-plugin-lodash

By default this plugin enables all [feature sets](https://github.com/lodash/lodash-webpack-plugin#feature-sets). If you know you don't need some of them, you can remove support for features sets by setting a `disabledFeatures` option like the following:
```javascript
plugins: [
{
resolve: `gatsby-plugin-lodash`,
options: {
disabledFeatures: [`shorthands`, `cloning`]
},
},
]
```
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