Misuse of CommonJS
TobiaszCudnik opened this issue · comments
Tobias Cudnik commented
From webpack:
WARNING in ./node_modules/merge-deep/utils.js
7:34-41 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
@ ./node_modules/merge-deep/utils.js
@ ./node_modules/merge-deep/index.js
Jon Schlinkert commented
You or webpack?
Fabio B commented
I'm getting this error too when bundling this library in with Webpack. Seems like ES6 import isn't supported with this library. Are there plans to have this library work with import statements?
import merge from 'merge-deep'
gives the above error.
Brian Woodward commented
@fabio-b the correct syntax would be import * as merge from 'merge-deep'
since merge-deep
doesn't export a method named merge
.
@TobiaszCudnik use the unlazy-loader in your webpack config if you're getting that error.