mattphillips / deep-object-diff

Deep diffs two objects, including nested structures of arrays and objects, and returns the difference. ❄️
https://www.npmjs.com/package/deep-object-diff
MIT License
1.05k stars 89 forks source link

Use ECMAScript modules instead of CommonJS modules #57

Closed rallets closed 2 years ago

rallets commented 4 years ago

Hi, building an Angular project with the latest version 10.0.7 I got this warning message WARNING in C:[...]\filename.ts depends on 'deep-object-diff'. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Is there any chance this library to be convert to ECMAScript modules? This will allow for a greater bundle size optimization at build time for apps that uses webpack or similar minifiers (https://web.dev/commonjs-larger-bundles/).

Thanks

mattphillips commented 2 years ago

Sorry to come to so long after you raised the issue @rallets!

I've just played with publishing the module with ES module support - would be great if you (or anyone) could confirm it's working. Should be available in v1.1.5

rallets commented 2 years ago

Hi @mattphillips, great to hear you published a new version. Unfortunately I'm not working anymore on that project, so I don't have access to the source code to test it's working as it should.

mattphillips commented 2 years ago

@rallets no worries at all - I just did a manual test with node and it seems to be OK.

I'll close this issue for now and if anyone runs into this issue again then feel free to comment or PR a fix 😅

Thanks for your quick reply @rallets