Lodash not TreeShaking with Webpack with Webpack 4?
I want to tree shake lodash as well as my unused multiply function from the generated bundle from webpack I have 2 main files app.js & math.js It contains the following code - app.js import map from "lodash/map"; import { sum } from "./math"; console.log("💩"); console.log(`2 + 3 = ${sum(2, 3)}`); map([1, 2, 3], x => { console.log(x); }); math.js export const sum = (a, b) => a + b; export const multiply = (m, n) => m * n; webpack.config.js const path = require("path"); const webpack = require("webpack"); const UglifyJSPlugin = require("uglifyjs-webpack-plugin"); const Jarvis = require("webpack