Closed damianobarbati closed 7 years ago
This plugin doesn't do TreeShaking.
Aside: You're importing the CommonJS version of lodash where CommonJS is NOT TreeShakable.
You can either use the ESModule version of that - lodash-es
import {map} from "lodash-es";
or you can use babel-plugin-lodash.
I'm seeing the full lodash library instead of just the map function in my vendor chunk in the compiled /build/visitor/vendor.min.js. Shouldn't just the map function be there with the following?
Repro here => https://github.com/damianobarbati/repro-babili-tree-shaking To reproduce:
git clone https://github.com/damianobarbati/repro-babili-tree-shaking
yarn install
yarn serve:dev
#ctrl+c to close loggingyarn build:prod
#run webpack and babili