Lodash imports in es/* no longer renamed to lodash-es in build output
See original GitHub issueDescribe the bug Yup v0.32.9 is producing build output errors in webpack for lodash imports.
ERROR in ../../../node_modules/yup/es/Condition.js 1:0-29
Module not found: Error: Can't resolve 'lodash/has' in '/home/circleci/repo/node_modules/yup/es'
The lodash imports in es build output used to be renamed to lodash-es, but in the latest release that is no longer the case.
To Reproduce
Install the latest version of yup from npm and build using webpack 5.
NOTE: if you do not provide a runnable reproduction the chances of getting feedback are significantly lower
Expected behavior Build should succeed
Platform (please complete the following information): N/A
Additional context None
Issue Analytics
- State:
- Created 2 years ago
- Reactions:12
- Comments:5
Top Results From Across the Web
import _ from 'lodash-es/lodash.js' used to work. Now it doesn't ...
EDIT: I tried using lodash with NodeJS instead of testing in a browser with Live Server, and it works fine using just the...
Read more >How to use lodash-es using import in Node 14? · Issue #4800
I'm trying to use lodash-es in the latest Node 14, which has out of the box support for ES modules . This means...
Read more >Lodash imports in es/* no longer renamed to lodash-es in build output
Describe the bug. Yup v0.32.9 is producing build output errors in webpack for lodash imports. ERROR in ../../../node_modules/yup/es/Condition.js 1:0-29 ...
Read more >How to Import Lodash in your JavaScript Projects for Lowest ...
The Correct Way to Include Lodash · 1. Import the entire lodash library · 2. Import using named aliases · 3. Import specific...
Read more >The Correct Way to Import Lodash Libraries: A Benchmark
Importing Lodash libraries doesn't need to be daunting. Get insights into the top three ways to import Lodash functions.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Because of this issue, all of lodash is imported and my webpack bundle size has grown
@GreenGremlin Were you able to fix this? I am having that problem