Commit Graph

274 Commits

Author SHA1 Message Date
Kent C. Dodds
42ee7212d2 set output.globalObject to 'this' (#7742)
Closes #7741
2019-09-26 16:24:48 -06:00
Samuel Meuli
93150c5135 Add "entrypoints" key to asset manifest (#7721) 2019-09-24 10:56:26 -06:00
Iguchi Tomokatsu
6f5221c2d7 Enable .eslintignore with extend flag (#7562) 2019-09-24 10:41:05 +03:00
Lewis Llobera
05f7924398 Remove 'shortcut' link type before 'icon' (#7707) 2019-09-20 09:51:27 -06:00
Doug Ross
4d533d4b92 Change runtime chunk name separator from tilde to dash (#7679) 2019-09-13 16:46:35 -07:00
Jannis Hell
8b7b819b4b Use const instead of var in env.js (#7526) 2019-09-13 16:37:32 -07:00
Tomáš Szabo
71c4d116fa Minor performance improvements (#7587)
- use ESLint cache
- remove useless `watch` option in fork-ts-checker
2019-09-10 22:44:24 -07:00
Brock Wills
c9b95047b9 Explicitly check that EXTEND_ESLINT is true (#7538) 2019-09-08 20:27:06 -07:00
Jerome Leclanche
bb31710123 Disable babel-loader's cacheCompression (#7633) 2019-09-08 18:48:30 -07:00
Ian Schmitz
cbaed7f9ff Fix ESLint 6 support (#7513)
* Remove extends restriction to fix ESLint 6 support

* Attempt to resolve CI errors
2019-08-13 11:24:29 -06:00
Andrea Puddu
efaee65e90 Fix RegExp from navigateFallbackBlacklist (workbox) (#7176)
Exclude URLs that contains a "?" character.
2019-08-08 16:07:50 -06:00
Jack Cross
ea2bcb7f59 Use readConfigFile instead of require for tsconfig (#7248) 2019-08-07 21:00:56 +03:00
Andrew Luca
914c95e87f Resolve relative paths for preprocessor styles (#5829)
preprocessor will output sourceMap by default
then check if sourceMaps are needed on resolve-url-loader

Fixes #4653
2019-08-05 20:28:09 -07:00
Sibiraj
066053c8b7 Set jsonpFunction to prevent conflicts (#5951) 2019-08-05 11:24:46 +03:00
Brody McKee
404af90d9a Add ESLint 6 support (#7415) 2019-07-28 15:05:54 +03:00
Brody McKee
3495286f8f Allow extending config used in eslint-loader (#7036) 2019-07-16 12:17:52 +03:00
Sudhir Mitharwal
dc50dd320e Allow title to be set when importing SVGs (#7118) 2019-07-15 17:54:19 +03:00
Min ho Kim
7c0dfef237 Fix various typos (#7355) 2019-07-15 17:12:35 +03:00
Peter Bengtsson
9d70c7afab Add environment variable to control image inlining threshold (#6060)
Fixes #3437
2019-06-17 21:25:39 -07:00
Maël Nison
b36d1ea1aa Adds the configuration for PnP/Typescript (#6856)
* Adds the configuration for PnP/Typescript

* Adds the header

* Bumps ts-pnp

* Bumps fork-ts-checker-webpack-plugin
2019-05-01 15:04:44 -06:00
Cory Reed
a2ae8a79c0 Remove Object.assign from MiniCssExtractPlugin options (#6854) 2019-04-29 09:31:50 -06:00
Dallon Feldner
785dd47937 Generate SVG component name in Jest fileTransform (#6706) 2019-04-25 15:35:03 -06:00
Robert van Steen
e7a2d6168a Set baseUrl from jsconfig.json/tsconfig.json (#6656)
* 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>
2019-04-16 15:08:24 -06:00
Ian Sutherland
9048dd66a0 Move list of files under files key in asset manifest (#6821) 2019-04-15 21:35:25 -06:00
Travis Fischer
50c1884e62 Fix react-scripts peer dependencies link local issue (#6579) (#6580) 2019-04-15 20:59:12 -06:00
Hrusikesh Panda
550274e307 Adds PostCSS Normalize (#5810)
* Add postcss-normalize plugin

* Configure PostCSS Normalize

* Add documentation

* Include the doc in sidebar

* Fix the id in sidebar.json

* Update adding-css-reset.md


Co-authored-by: Jack Zhao <jzhao@fb.com>
Co-authored-by: Ian Sutherland <ian@iansutherland.ca>
2019-04-05 10:23:59 -06:00
Endilie Yacop Sucipto
3e336d91e0 fix: terser-webpack-plugin hanging on WSL (#6732)
* fix: terser-webpack-plugin hanging on WSL

* nits

* Merge branch 'master' into terser-parallel-bug-wsl

Co-authored-by: Jack Zhao <jzhao@fb.com>
2019-04-04 23:24:27 -06:00
Ian Sutherland
001c23eff4 Enable futureEmitAssets in webpack config (#6696) 2019-04-04 14:35:48 -06:00
Ian Schmitz
eee8491d57 Add TypeScript linting support (#6513)
* Initial pass adding typescript-eslint

* Add warning to shared rule set

* Add documentation for setting up VSCode extension

* Provide tsconfig path to typescript-eslitn
2019-03-14 21:17:17 -06:00
Kelvin Jin
88d6f029bd Add empty mock for http2 (#5686) 2019-03-13 19:50:19 -06:00
Ian Schmitz
1a04b96795 Type check JSON files (#6615) 2019-03-11 10:20:00 -06:00
Ian Sutherland
1548a0a92e Reapply "Speed up TypeScript v2 (#6406)" (#6586)
This reverts commit b2cf28b7f1 and reapplies #6406.
2019-03-06 17:46:38 -07:00
Ian Sutherland
b2cf28b7f1 Revert "Speed up TypeScript v2 (#6406)" (#6585)
This reverts commit 6a5b3cdaaa.
2019-03-06 17:33:17 -07:00
Ian Schmitz
6c8e2e53c5 Use contenthash instead of chunkhash for better long-term caching (#6387) 2019-02-20 18:24:19 -08:00
Jack Zhao
28f5427979 revert css sourcemaps in development (#6472)
This fixes #6399.
2019-02-20 16:16:18 -05:00
Ian Schmitz
6a5b3cdaaa Speed up TypeScript v2 (#6406)
* 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
2019-02-18 16:31:44 -08:00
Ian Schmitz
09def49be5 Revert "Switch to eval-source-map (#5060)" (#6444)
This reverts commit 773d103986.
2019-02-18 06:50:16 -05:00
Gasim Gasimzada
319cf9b9e1 Add forward ref to SVG Component (#5457)
* Add forward ref to SVG component

* Write proper component for the ref test

* Add ref to jest svg transform and fix tests

* Fix SVG file location

* Use proper `ref` instead of svgRef in tests

* Add ref to svgr loader
2019-02-14 12:20:39 -07:00
Ian Schmitz
544a5943ce Revert "Speed up TypeScript projects (#5903)"
This reverts commit 5ce09db2b3.
2019-02-11 08:10:33 -08:00
Ian Schmitz
72c49ac807 Revert "Move fork-ts-checker-webpack-plugin dependency to react-dev-utils (#6395)"
This reverts commit c2b715847c.
2019-02-11 08:10:10 -08:00
X.L
c2b715847c Move fork-ts-checker-webpack-plugin dependency to react-dev-utils (#6395) 2019-02-11 07:41:55 -08:00
zhuoli99
18d5e87b75 Sass source map for dev (#5713)
Sass source map for dev
2019-02-07 21:18:50 -08:00
Tomáš Szabo
5ce09db2b3 Speed up TypeScript projects (#5903)
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.

![nov-26-2018 15-47-01](https://user-images.githubusercontent.com/5549148/49021284-9446fe80-f192-11e8-952b-8f83d77d5fbc.gif)


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
2019-02-07 19:34:52 -08:00
Charles Pritchard
bacb440748 Add empty mock for dns (#6292) 2019-02-05 09:38:52 +02:00
Dotan Simha
34e5029c54 Add empty mock for module (#5798) 2019-01-16 11:26:24 +02:00
Adam Laycock
8174eed5b3 Upgrade @svgr/webpack to 4.1.0 (#5816)
* Upgrade svgr to 4.0.3

* Upgrade svgr to 4.0.4

* Remove unnecessary prettier option

* Update to 4.1.0
2019-01-11 22:45:32 -05:00
Jason Laster
773d103986 Switch to eval-source-map (#5060)
Switches to eval-source-map, which is easier for webpack to recompute
when a file changes and has column based mappings, which lets firefox
devtools show original variable in the debugger and evaluate original
expressions in the console.
2019-01-06 22:42:05 -05:00
Ian Schmitz
005ee5b952 Bump eslint-plugin-react version and update webpack config (#6132)
* Bump eslint-plugin-react version

* Move eslint-plugin-react settings into eslint-config-react-app

* Add react/no-typos rule
2019-01-06 15:05:14 -08:00
shawtung
1aca3cc416 Fix comment typo (#6036) 2018-12-30 18:45:05 -08:00
Ian Schmitz
49e258b4a6 Support setupTests.ts (#5698) 2018-11-22 21:14:25 -08:00