Skip to content

Commit

Permalink
Adding information regard relay-tools#69 (Cannot find module 'core-js…
Browse files Browse the repository at this point in the history
…/modules/es6.*')
  • Loading branch information
michal-ciechan committed Jun 22, 2020
1 parent 86f73b9 commit 2157587
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ import 'regenerator-runtime/runtime';
import { RelayNetworkLayer } from 'react-relay-network-modern';
```

### What if Webpack errors with `Error: Cannot find module 'core-js/modules/es6.*'`?

`core-js` is not an explicit dependency as it adds [30kb for client bundles](https://bundlephobia.com/[email protected]).

If this error occurs you can do one of the following:

- Explicitly install core-js v2. E.g.
- `yarn add [email protected]
- Try referencing one of the non default imports:
- `import { RelayNetworkLayer } from 'react-relay-network-modern/node8';`
- `import { RelayNetworkLayer } from 'react-relay-network-modern/es';`

### Different builds

This library contains different builds for any purposes:
Expand Down

0 comments on commit 2157587

Please sign in to comment.