deepdash: deepdash is not webpackable

I created a simple demo project and included the dist bundle within it to show my problem. I am using deepdash very much as described in the docs, like this:

import _ from 'lodash';
import deepdash from 'deepdash';

deepdash(_);

(reference)

However, webpack seems to have some kind of problem with this, since it creates this line in the bundle:

deepdash__WEBPACK_IMPORTED_MODULE_1___default()(lodash__WEBPACK_IMPORTED_MODULE_0___default.a);

(reference)

which then leads to the following error in the browser: image

Now I have to put a disclaimer here: I am not entirely sure this is either a deepdash or webpack problem, so I am happy to report it over at webpack if you feel deepdash is doing everything correctly. I am also not sure that I am not just a bit stupid and screw up something myself - in that case, sorry!

I hope the minimal project I set up helps debugging a bit. If I can do anything to help debug, I am happy to do so.

P.S.: This works absolutely fine in node.js where I run all my tests with mocha and such, but webpack just won’t take it.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

Support is not free here, you know… but luckily we accept GitHub stars instead of coins 😉

import pickDeep from ‘deepdash/pickDeep’;

worked with nuxt it seems! thanks!

Welcome to Super Star Support Plan, now you can call me at midnight (but first you will need my phone number, paid separately)

Pjuh, i had one left!😃

Trying now!