0

While i am using import _merge from 'lodash/merge'; /** works only on prod **/ i am getting the following error only on DEV:

bootstrap 353c3e00f9bba3b229e6:21 ERROR Error: Uncaught (in promise): TypeError: merge_1.default is not a function TypeError: merge_1.default is not a function

i fixed that by changing the import statement to:

import _merge = require('lodash/merge'); /** works only on dev **/  

i do not want to load all lodash lib. how can i fixed that so i will not need to change the style of the import statement while changing from dev to prod?

Omtechguy
  • 3,321
  • 7
  • 37
  • 71
  • Possible duplicate of [how to import single lodash function?](https://stackoverflow.com/questions/43479464/how-to-import-single-lodash-function) – th3n3wguy Mar 29 '18 at 01:38
  • Its not duplication. Here we are talking about something that work on prod but not on dev. – Omtechguy Mar 29 '18 at 07:05

0 Answers0