Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document common peer dependency warnings #3653

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Create React App [![Build Status](https://travis-ci.org/facebookincubator/create-react-app.svg?branch=master)](https://travis-ci.org/facebookincubator/create-react-app)

## @ethersage/react-scripts
This is fork is maintained for the purpose of publishing `@ethersage/react-scripts` only.

- Work shoud be merged to the `ethersage` branch
- Changes should not be made to any package other that `react-scripts`.
- New versions of `@facebookincubator/create-react-app` upstream will be merged into `ethersage` regularly. The first ethersage release off of a given upstream semver version will have the same version. Thereafter, changes to an upstream version will use a pre-release version of the upstream, such as `@ethersage/react-scripts@1.0.17-ethersage.1`.

### Install warnings

`yarn` on projects created with `@ethersage/react-scripts` produces a number of "normal" peer dependency warnings that are caused by upstream dependencies. The following are known as of the last update here, but will change as upstream dependencies change:

```
warning "@ethersage/react-scripts > react-hot-loader > redbox-react@1.4.2" has incorrect peer dependency "react@^0.14.0 || ^15.0.0".
warning "@ethersage/react-scripts > react-hot-loader > redbox-react@1.4.2" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0".
```

## Continiuing Upstream README

Create React apps with no build configuration.

* [Getting Started](#getting-started) – How to create a new app.
Expand Down
4 changes: 4 additions & 0 deletions packages/react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ module.exports = {
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.
entry: [
// HMR,
'react-hot-loader/patch',

// We ship a few polyfills by default:
require.resolve('./polyfills'),
// Include an alternative client for WebpackDevServer. A client's job is to
Expand Down Expand Up @@ -169,6 +172,7 @@ module.exports = {
// @remove-on-eject-begin
babelrc: false,
presets: [require.resolve('babel-preset-react-app')],
plugins: ['react-hot-loader/babel'],
// @remove-on-eject-end
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
Expand Down
7 changes: 4 additions & 3 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "react-scripts",
"version": "1.0.17",
"name": "@ethersage/react-scripts",
"version": "1.0.17-ethersage.2",
"description": "Configuration and scripts for Create React App.",
"repository": "facebookincubator/create-react-app",
"repository": "ethersage/create-react-app",
"license": "MIT",
"engines": {
"node": ">=6"
Expand Down Expand Up @@ -50,6 +50,7 @@
"promise": "8.0.1",
"raf": "3.4.0",
"react-dev-utils": "^4.2.1",
"react-hot-loader": "^3.0.0",
"style-loader": "0.19.0",
"sw-precache-webpack-plugin": "0.11.4",
"url-loader": "0.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module.exports = function(
command = 'npm';
args = ['install', '--save', verbose && '--verbose'].filter(e => e);
}
args.push('react', 'react-dom');
args.push('react', 'react-dom', 'react-hot-loader');

// Install additional template dependencies, if present
const templateDependenciesPath = path.join(
Expand Down
21 changes: 20 additions & 1 deletion packages/react-scripts/template/src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

ReactDOM.render(<App />, document.getElementById('root'));
const rootEl = document.getElementById('root');
ReactDOM.render(
<AppContainer>
<App />
</AppContainer>,
rootEl
);
registerServiceWorker();

if (module.hot) {
module.hot.accept('./App', () => {
const NextApp = require('./App').default;
ReactDOM.render(
<AppContainer>
<NextApp />
</AppContainer>,
rootEl
);
});
}