forked from relay-tools/react-relay-network-modern
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding information regard relay-tools#69 (Cannot find module 'core-js…
…/modules/es6.*')
- Loading branch information
1 parent
86f73b9
commit 2157587
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|