* Set baseUrl from jsconfig.json/tsconfig.json
* Resolve the path for loading modules
* Add tests for jsconfig.json
* Add jsconfig.json
* Update packages/react-scripts/scripts/start.js
* Move baseUrl test to config folder
* Remove alias test
* Use chalk from react-dev-utils
* Add lost absolute file for typescript baseUrl test
* Update packages/react-scripts/config/modules.js
* Update other references of useTypeScript to hasTsConfig
* Fix casing of TypeScript
* Keep respecting NODE_PATH for now to support multiple module paths.
* Add test for NODE_PATH
* Add fallback if NODE_PATH is not set.
* Fix node path behavior tests
* Remove debugging code from behavior test suite
* Remove more debugging code
* Show NODE_PATH deprecation warning during build
Co-authored-by: Ian Sutherland <ian@iansutherland.ca>
Co-authored-by: Brody McKee <mrmckeb@users.noreply.github.com>
Co-authored-by: Jack Zhao <jzhao@fb.com>
* Revert "Revert "Speed up TypeScript projects (#5903)""
This reverts commit 544a5943ce.
* Move fork-ts-checker dep to react-dev-utils
* Convert WebpackDevServerUtils.createCompiler to take in options arg
* Update README.md for react-dev-utils
As a lot of [people](https://hackernoon.com/why-i-no-longer-use-typescript-with-react-and-why-you-shouldnt-either-e744d27452b4) is complaining about TypeScript performance in CRA, I decided to enable `async` mode in TypeScript checker.
These changes basically brings the JS compilation times to TS projects. So, recompilation took less than 1 second instead of 3 seconds in medium size project.
The problem with async mode is that type-errors are reported after Webpack ends up recompilation as TypeScript could be slower than Babel. PR allows to emit files compiled by Babel immediately and then wait for TS and show type errors in terminal later. Also, if there was no compilation errors and any type error occurs, we trigger a hot-reload with new errors to show error overlay in browser.
Also, I wanted to start a discussion about `skipLibCheck: false` option in default `tsconfig.json`. This makes recompilations really slow and we should consider to set it to `true` or at least give users a big warning to let them know that it could be really slow.
The following video is showing the updated workflow with a forced 2.5 second delay for type-check to give you an idea how it works.

I'm pretty sure that PR needs some polishing and improvements but it should works as it is. Especially a "hack" with reloading the browser after type-check looks ugly to me.
cc @brunolemos as he is an initiator of an original TypeScript PR.
Should fix https://github.com/facebook/create-react-app/issues/5820
* Rename production configuration
* Upgrade lint staged
* Merge mode, bail, devtool, and entry
* Merge output settings
* Remove old comment
* Merge some trivial differences
* Disable minimize in development mode
* Only minify html and generate SW in production
* Adjust comment
* Toggle development plugins
* Add missing imports
* Scope settings
* Delete development config
* Use new config file
* Remove unnecessary config import
* 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
* change link to advanced deployment
* Use custom CRA link for deployment
* use custom link for minification failure
* update link for deployment
* feedback
* 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
* Change proxy handling to allow multiple proxies to be specified in package.json.
* Up webpack-dev-server to 2.4.2
Webpack Dev Server version 2.4.2 handles the external websocket upgrade
for all proxies
* Fix the listen() call
* Switch to correct default host
* Remove promises and extract to react-dev-utils
* oops
* 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
* Change proxy localhost to I27.0.0.1 for windows
* Update comment
* resolve localhost IP with DNS lookup on windows
* Fix CI errors
* Promisify addWebpackMiddleware
* Remove Node 6 syntax
* Update addWebpackMiddleware.js
* Actually use the resolved proxy
Pass the host from environment variable as argument of the devServer's
listen function instead of a field of options object.
Set the default host to 0.0.0.0 instead of localhost.
* 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
* Refactor start script into modules
* Move dev server config into config file
* Replace eject file whitelist with a "remove-file-on-eject" flag
* Move utils into scripts folder (for inclusion in ejection)
* Add missed changes
* Pass showInstructions as an argument
* Fix eject bug
* Don't eject babelTransform