apollo-feature-requests icon indicating copy to clipboard operation
apollo-feature-requests copied to clipboard

Avoid importing non ES6 dependencies

Open julkue opened this issue 5 years ago • 3 comments

Since v10 Angular is showing a warning for graphql-tag since it's a CommonJS import that should now be replaced with ES6 code. The same applies for apollo's dependencies itself, for example the "zen-observable" dependency is a CommonJS dependency used by apollo-client and apollo-link according to npm ls:

+-- [email protected]
| `-- [email protected]
`-- [email protected]
  `-- [email protected]
    `-- [email protected]  deduped

This will show a warning in the console and in the browser by Angular:

WARNING in P:\cando-cx-frontend\app\node_modules\zen-observable-ts\lib\bundle.esm.js depends on zen-observable. CommonJS or AMD dependencies can cause opt
imization bailouts.

To avoid this, apollo should avoid using CommonJS dependencies.

Related:

https://github.com/apollographql/graphql-tag/issues/303

julkue avatar Jun 29 '20 08:06 julkue

Facing the same issue, though it is not a big problem, but still want to be handled

UkonnRa avatar Jul 17 '20 12:07 UkonnRa

Facing the same issue here too.

nxNero avatar Aug 05 '20 19:08 nxNero

Same issue here.

NestorPerez13 avatar Jan 04 '21 19:01 NestorPerez13