Angular build floods with ESM warnings
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- angular, typescript
- Domain
- frontend
Research direction
Reproduce an Angular v20 build using JSON Forms 3.8.0 and inspect the listed entry points in node_modules/@jsonforms/angular, @jsonforms/core, and @jsonforms/angular-material. Trace the lodash, ajv, ajv-formats, and dayjs imports, then verify that the build no longer emits the reported ESM warnings and avoids unnecessary package inclusion.
Written by the indexing model from the issue text.
Description
Describe the bug
Not sure if should report as a bug but from my point of view it's an issue that should be addressed.
At the moment when building the angular project (v20) I'm being flooded with "X package is not ESM" coming from this package.
We use lodash-es and this also means we will have two times the lodash package.
lodash is not the only culprit: "avj" and "dayjs". We don't use dayjs not sure why this is being included on the bundle.
Looking forward to see how we can proceed with fixing this, I could help on some parts.
Imports flagged
[WARNING] Module 'lodash/cloneDeep' used by 'node_modules/@jsonforms/angular/lib/fesm2022/jsonforms-angular.mjs' is not ESM
[WARNING] Module 'lodash/merge' used by 'node_modules/@jsonforms/angular/lib/fesm2022/jsonforms-angular.mjs' is not ESM
[WARNING] Module 'lodash/maxBy' used by 'node_modules/@jsonforms/angular/lib/fesm2022/jsonforms-angular.mjs' is not ESM
[WARNING] Module 'lodash/isEqual' used by 'node_modules/@jsonforms/angular/lib/fesm2022/jsonforms-angular.mjs' is not ESM
[WARNING] Module 'lodash/get' used by 'node_modules/@jsonforms/angular/lib/fesm2022/jsonforms-angular.mjs' is not ESM
[WARNING] Module 'lodash/isEmpty' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/startCase' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/keys' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/range' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/has' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/find' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/includes' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'ajv' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'ajv-formats' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/filter' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/fp/set' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/fp/unset' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/isFunction' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/remove' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/endsWith' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/last' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/reduce' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/toPairs' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'lodash/isUndefined' used by 'node_modules/@jsonforms/core/lib/jsonforms-core.esm.js' is not ESM
[WARNING] Module 'dayjs' used by 'node_modules/@jsonforms/angular-material/lib/fesm2022/jsonforms-angular-material.mjs' is not ESM
[WARNING] Module 'dayjs/plugin/customParseFormat' used by 'node_modules/@jsonforms/angular-material/lib/fesm2022/jsonforms-angular-material.mjs' is not ESM
[WARNING] Module 'lodash/some' used by 'node_modules/@jsonforms/angular-material/lib/fesm2022/jsonforms-angular-material.mjs' is not ESM
Expected behavior
Not have ESM build warnings, better manage which packages are being included
Steps to reproduce the issue
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Screenshots
Which Version of JSON Forms are you using?
3.8.0
Package
Angular Bindings
Additional context
No response
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 423
- Avg merge
- 17d 8h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipsesource/jsonforms
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
eclipsesource/jsonforms#2624 ·
-
react
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipsesource/jsonforms#2616 · 1 comment ·
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
eclipsesource/jsonforms#2570 · 1 comment ·
-
angular core react vue
Difficulty 4/5 3-5 days Newbie friendliness 64/100
eclipsesource/jsonforms#2627 ·
-
react-material: date/time pickers wire `autoFocus`, `onFocus` and `onBlur` to an aria-hidden input Openmaterial react
Difficulty 3/5 1-2 days Newbie friendliness 78/100
eclipsesource/jsonforms#2615 ·
All issues in eclipsesource/jsonforms
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·