-
Notifications
You must be signed in to change notification settings - Fork 429
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
Fixes issue #146. #147
Fixes issue #146. #147
Conversation
dawnmist
commented
Nov 28, 2017
- Document the alternative module.exports options.
- Discuss configuration options for Jest/Babel and when you may want to use Jest in package.json verses the 'jest' function in config-overrides.js
- Document how to customise the configuration for the Webpack Dev Server.
* Document the alternative module.exports options. * Discuss configuration options for Jest/Babel and when you may want to use Jest in package.json verses the 'jest' function in config-overrides.js * Document how to customise the configuration for the Webpack Dev Server.
Awesome. Still needs some review to fix minor grammar issues. But content very descriptive indeed. I would also add another way to manage overrides in folder instead of single file by creating Probably we may note that currently it is very hard to override entry-point. In CRA it defined in path.js. |
Good point on overriding the entry point - I worked around it by using react-scripts-ts instead of react-scripts (which meant it was set up for index.ts by default), but that means that I'm using the --scripts-version option for react-app-rewired which is also not documented in the Readme file. I'll add in some documentation for using a config-overrides directory, description on why its hard to override the entry-point with , and on using --scripts-version to set react-app-rewired to use a custom version of react-scripts. |
In --scripts-version docs we can mention file paths that we rely on in our scripts:
|
* Update grammar in config-override object section * Add an example showing some customisation inside each of the three object fields. * Add a description of the issue with attempting to change the entry point for the app, and list some work-arounds that can be used. * Document the --scripts-version option. * Document the option of using a config-overrides directory.
README.md
Outdated
``` | ||
|
||
React-app-rewired requires a custom react-scripts package to provide the following files: | ||
* config/env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am only now noted that I forgot to add .js
extension to files.
README.md
Outdated
By default, the `override-config.js` file exports a single function to use when customising the webpack configuration for compiling your react app in development or production mode. It is possible to instead export an object from this file that contains up to three fields, each of which is a function. This alternative form allows you to also customise the configuration used for Jest (in testing), and for the Webpack Dev Server itself. | ||
|
||
```javascript | ||
module.exports = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now we have 2 almost similar examples: here and in 4) Example object-style config-overrides.js
section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. I was working further down in the file, and had forgotten that I had already created an initial example. I've merged the details for the two into the first of the examples.