If you don’t wish to use any bundling tools, you will need to provide a path to the lodash folder within node_modules
, relative to the JavaScript file that you have the import statement in.
If you do not wish to use a bundler, it would also be worthwhile importing from the specific file, the function you need. For example:
import _each from '../node_modules/lodash/each'