Named exports 🕶
v2.0 breaking changes
- only named exports
// before:
import copy from 'copy-anything'
// now:
import { copy } from 'copy-anything'
Reasoning
I was experiencing a lot of problems with just the default export depending on the environment: browser, different versions of nodeJS, rollup/webpack/parcel, ... and also depending on wether the CJS or ESM built file was imported.
Named exports work much more consistently throughout all environments! 🌝