To use lodash at the same time as the underscore you need to do some dirty tricks because both libraries share the same global variable _
-
Need to add
lodashdependency intopackage.jsonof your module
-
run
npm install - to installlodashnpm package -
add to the
webpack.config.jsthe following lines
-
In the main js file of your module add this line
_.noConflict(). This line is required to restore global variable _ for underscore package to do not affect existing js code.
-
Use
_lodashglobal variable instead of _ for call functions fromlodashpackage

-
run npm run webpack:dev - to build and bundle scripts -
enjoy



