You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Tree shaking](https://developer.mozilla.org/docs/Glossary/Tree_shaking) bundlers will eliminate unused exports (perhaps [`reportCacheErrors`](#function-reportcacheerrors)).
656
+
The bundle impact may be smaller, depending on how much of the API you use.
657
657
658
658
#### Apollo
659
659
@@ -669,15 +669,15 @@ Several dependencies must be installed for a minimal Apollo project.
669
669
670
670
In addition, [fragment matcher](https://www.apollographql.com/docs/react/advanced/fragments#fragment-matcher) config impacts bundle size relative to the number and complexity of schema unions and interfaces; see [**_Cache strategy_**](#cache-strategy).
671
671
672
-
### Native ESM
672
+
### ESM
673
673
674
674
#### graphql-react
675
675
676
-
Supports native ESM via `.mjs` files for Node.js in [`--experimental-modules`](https://nodejs.org/api/esm.html#esm_enabling) mode and [tree shaking](https://developer.mozilla.org/docs/Glossary/Tree_shaking) bundlers like [webpack](https://webpack.js.org). For legacy environments CJS is provided via `.js` files.
676
+
Supports [ESM in Node.js](https://nodejs.org/api/esm.html) whilst avoiding the [dual package hazard](https://nodejs.org/api/esm.html#esm_dual_package_hazard) via [ESM wrappers around CJS](https://nodejs.org/api/esm.html#esm_approach_1_use_an_es_module_wrapper) and [`package.json``exports` field conditional exports](https://nodejs.org/api/esm.html#esm_conditional_exports).
677
677
678
678
#### Apollo
679
679
680
-
No support for native ESM, although they do provide faux ESM via package `module` fields for [tree shaking](https://developer.mozilla.org/docs/Glossary/Tree_shaking) bundlers like [webpack](https://webpack.js.org).
680
+
Faux ESM that can’t be used by Node.js is provided via package `module` fields for [tree shaking](https://developer.mozilla.org/docs/Glossary/Tree_shaking) bundlers like [webpack](https://webpack.js.org).
0 commit comments