To analyze Webpack bundles, a "stats" JSON is required.
This PR allows that file to be created and saved to the `build`
directory, so that users can use it with Webpack-specific insight
tools like `webpack-bundle-analyzer` without ejecting their
application.
Updated the README to include details for how to do this.
* Run yarn after ejecting.
* On eject, choose to run yarn instead of npm if yarn is available.
* Move monorepo to react-dev-utils.
* Fix lint.
* Rename monorepo to workspaceUtils.
* Add react-dev-utils dep for create-react-app.
* getMonorepo -> findMonorepo
* Offer to set browser defaults
* Catch error on no
* Add ending newlines
* Ensure we re-check to prevent defaults from leaking
* Reduce nesting
* Add defaults message
* More explicit
* Run real scripts in local development
* Add preflight check warning
* I know what I am doing
* Move preflight check into individual scripts
This ensures we don't try to filter NODE_PATH twice, accidentally removing the now-absolute path.
* Slightly tweak the wording
* Fix lint
* format UglifyJs error
* move formatBuildError to react-dev-utils
* fix readme
* use regex for plucking the path from stack
* make path human readable and fallback to show error if regex not matched
* rename to printBuildError and add link to the docs
* fix link indentation
* improve readibility + shorten link
* Fix incorrect check if CI variable is set to true
Originally build would fail on warnings with any value of CI environment variable. Now it will correctly check if it's true.
Discussed here: https://github.com/facebookincubator/create-react-app/issues/2453
* Check for "not false" instead of "not true"
After discussion we decided that this will be closer to current functionality and not break anything.
* support different env configs.
* fomrat code
* Hide doc
* Slightly rework the PR
* Remove .env in default template
* Use just one entry in the paths
* Unify env.js and loadEnv.js
* Oops, forgot these folks
* Suggest `serve` for serving the `build` directory
* How to handle it with Node in prod (or other platforms)
* Pretty newline added
* Adjusted default port of static server
* Remove `open` command from output
* Removed constant assignment
* Better explanation for not using having to use a static server
* Cute newline added
* Style nits
* mv create-react-app/index.js -> create-react-app/creteReactApp.js
* update to modern code style
* var -> cosnt
* set trailing-coma to es5 for prettier
Use the configured appBuild value in paths.js instead of hard-coding it to 'build'. This is helpful for the ejected case where the appBuild path is changed to another folder name.
* Added functionality to crash the build during CI whenever linter warnings are encountered.
* Updated the docs with a description on how to use the build in CI
* Fixed small typo
* Fixed description of build error.
In the `create-react-app` command, try to install packages using Yarn.
If Yarn is not installed, use npm instead.
In `react-scripts`, detect if the project is using Yarn by checking if
a `yarn.lock` file exists. If the project is using Yarn, display all
the instructions with Yarn commands and use Yarn to install packages
in `init` and `eject` scripts.