How to use lodash-webpack-plugin - 5 common examples

To help you get started, we’ve selected a few lodash-webpack-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ctrlplusb / react-component-queries / tools / webpack / configFactory.js View on Github external
ifElse(minimize)(
        new webpack.optimize.UglifyJsPlugin({
          compress: {
            screw_ie8: true,
            warnings: false,
          },
          mangle: {
            screw_ie8: true,
          },
          output: {
            comments: false,
            screw_ie8: true,
          },
        }),
      ),
      ifElse(env === 'production')(new LodashModuleReplacementPlugin()),
    ]),
    module: {
      rules: [
        {
          test: /\.js$/,
          loader: 'babel-loader',
          include: [resolvePath(appRootDir.get(), './src')],
        },
      ],
    },
  }
}
github PaulLeCam / react-leaflet / webpack.config.babel.js View on Github external
}

export default [
  {
    ...config,
    output: {
      filename: 'react-leaflet.js',
      library: 'ReactLeaflet',
      libraryTarget: 'umd',
      path: outputPath,
    },
    plugins: [
      new webpack.DefinePlugin({
        'process.env.NODE_ENV': JSON.stringify('development'),
      }),
      new LodashModuleReplacementPlugin(lodashFeatures),
    ],
  },
  {
    ...config,
    output: {
      filename: 'react-leaflet.min.js',
      library: 'ReactLeaflet',
      libraryTarget: 'umd',
      path: outputPath,
    },
    plugins: [
      new webpack.DefinePlugin({
        'process.env.NODE_ENV': JSON.stringify('production'),
      }),
      new LodashModuleReplacementPlugin(lodashFeatures),
      new webpack.optimize.UglifyJsPlugin({
github ctrlplusb / react-component-queries / webpack.config.babel.js View on Github external
new webpack.optimize.UglifyJsPlugin({
      output: {
        comments: false,
      },
      compressor: {
        pure_getters: true,
        unsafe: true,
        unsafe_comps: true,
        screw_ie8: true,
        warnings: false,
      },
    })
  );

  config.plugins.push(
    new LodashModuleReplacementPlugin()
  );
}

if (generateStats) {
  config.plugins.push(
    new WebpackStatsPlugin('stats.json', {
      chunkModules: true,
      exclude: [/node_modules[\\\/]react/],
    })
  );
}

export default config;
github ctrlplusb / react-sizeme / webpack.config.babel.js View on Github external
new webpack.optimize.UglifyJsPlugin({
      output: {
        comments: false,
      },
      compressor: {
        pure_getters: true,
        unsafe: true,
        unsafe_comps: true,
        screw_ie8: true,
        warnings: false,
      },
    })
  );

  config.plugins.push(
    new LodashModuleReplacementPlugin()
  );
}

if (generateStats) {
  config.plugins.push(
    new WebpackStatsPlugin('stats.json', {
      chunkModules: true,
      exclude: [/node_modules[\\\/]react/],
    })
  );
}

export default config;
github localnerve / react-pwa-reference / src / build / webpack / main.js View on Github external
options: {
            search: '__TEST__',
            replace: '""'
          }
        },
        {
          test: /\.(js|jsx)$/,
          include: [
            `${path.resolve(settings.src.baseDir)}`
          ],
          loader: 'babel-loader'
        }
      ]
    },
    plugins: [
      new LodashModuleReplacementPlugin({
        collections: true
      }),
      new webpack.DefinePlugin(definitions),
      new webpack.NormalModuleReplacementPlugin(
        /es6-promise/, require.resolve(es6PromiseMock)
      ),
      new webpack.NormalModuleReplacementPlugin(
        /for-each/, require.resolve('lodash/forEach')
      ),
      new webpack.NormalModuleReplacementPlugin(
        /is-function/, require.resolve('lodash/isFunction')
      ),
      new webpack.NormalModuleReplacementPlugin(
        /lodash.debounce/, require.resolve('lodash/debounce')
      ),
      new webpack.NormalModuleReplacementPlugin(

lodash-webpack-plugin

Smaller modular Lodash builds.

MIT
Latest version published 2 years ago

Package Health Score

65 / 100
Full package analysis

Popular lodash-webpack-plugin functions