Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including lodash-webpack-plugin with all npm packages installed. Try it out:

require("webpack/package.json"); // webpack is a peer dependency. var lodashWebpackPlugin = require("lodash-webpack-plugin")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

lodash-webpack-plugin v0.11.5

Smaller modular Lodash builds.


Create smaller Lodash builds by replacing feature sets of modules with noop, identity, or simpler alternatives.

This plugin complements babel-plugin-lodash by shrinking its cherry-picked builds even further!


$ npm i --save lodash
$ npm i --save-dev lodash-webpack-plugin babel-core babel-loader babel-plugin-lodash babel-preset-env webpack




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

module.exports = {
  'module': {
    'rules': [{
      'use': 'babel-loader',
      'test': /\.js$/,
      'exclude': /node_modules/,
      'options': {
        'plugins': ['lodash'],
        'presets': [['env', { 'modules': false, 'targets': { 'node': 4 } }]]
  'plugins': [
    new LodashModuleReplacementPlugin,
    new webpack.optimize.UglifyJsPlugin

Opt-in to features with an options object:

new LodashModuleReplacementPlugin({
  'collections': true,
  'paths': true

Feature Sets

The following features are removed by default _(biggest savings first)_:

shorthandsIteratee shorthands for, _.matches, & _.matchesProperty.
cloningSupport “clone” methods & cloning source objects.
curryingSupport “curry” methods.
cachingCaches for methods like _.cloneDeep, _.isEqual, & _.uniq.
collectionsSupport objects in “Collection” methods.
exoticsSupport objects like buffers, maps, sets, symbols, typed arrays, etc.
guardsGuards for host objects, sparse arrays, & other edge cases.
metadataMetadata to reduce wrapping of bound, curried, & partially applied functions.
_(requires currying)_
deburringSupport deburring letters.
unicodeSupport Unicode symbols.
chainingComponents to support chain sequences.
memoizingSupport _.memoize & memoization.
coercionsSupport for coercing values to integers, numbers, & strings.
flatteningSupport “flatten” methods & flattening rest arguments.
pathsDeep property path support for methods like _.get, _.has, & _.set.
placeholdersArgument placeholder support for “bind”, “curry”, & “partial” methods.
_(requires currying)_


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free