turf icon indicating copy to clipboard operation
turf copied to clipboard

Angular complaining on commonjs optimization bailouts

Open Harpush opened this issue 2 years ago • 1 comments

Version: 6.5

When installed in an angular project - it complains that importing commonjs can cause optimization bailouts. The following packages are the culprits:

  1. geojson-rbush
  2. geojson-equality
  3. density-clustering
  4. skmeans
  5. rbush
  6. concaveman
  7. deep-equal

Is there any chance somehow to tackle it?

Harpush avatar Oct 11 '23 08:10 Harpush

Hi @Harpush. Could you please try one of the recent alpha releases to see if they fix this issue for you? We've changed around the way Turf is packaged for esmodules and commonjs.

smallsaucepan avatar Jan 10 '24 12:01 smallsaucepan

@smallsaucepan I somehow didn't see the comment. I will check it. Anyway brush is now esm: https://github.com/mourner/rbush/issues/134#issuecomment-2194104597 Maybe an update is needed

Harpush avatar Jun 27 '24 09:06 Harpush

Thanks @harpush. We will definitely check that out. Reopen this issue if this problem still occurs with v7.

smallsaucepan avatar Jun 27 '24 13:06 smallsaucepan