mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-29 01:45:40 +08:00
Add TSC_COMPILE_ON_ERROR setting (#6931)
This commit is contained in:
@@ -31,7 +31,7 @@ yarn add typescript @types/node @types/react @types/react-dom @types/jest
|
||||
|
||||
Next, rename any file to be a TypeScript file (e.g. `src/index.js` to `src/index.tsx`) and **restart your development server**!
|
||||
|
||||
Type errors will show up in the same console as the build one.
|
||||
Type errors will show up in the same console as the build one. You'll have to fix these type errors before you continue development or build your project. For advanced configuration, [see here](advanced-configuration.md).
|
||||
|
||||
To learn more about TypeScript, check out [its documentation](https://www.typescriptlang.org/).
|
||||
|
||||
|
||||
@@ -23,3 +23,4 @@ You can adjust various development and production settings by setting environmen
|
||||
| INLINE_RUNTIME_CHUNK | 🚫 Ignored | ✅ Used | By default, Create React App will embed the runtime script into `index.html` during the production build. When set to `false`, the script will not be embedded and will be imported as usual. This is normally required when dealing with CSP. |
|
||||
| IMAGE_INLINE_SIZE_LIMIT | 🚫 Ignored | ✅ Used | By default, images smaller than 10,000 bytes are encoded as a data URI in base64 and inlined in the CSS or JS build artifact. Set this to control the size limit in bytes. Setting it to 0 will disable the inlining of images. |
|
||||
| EXTEND_ESLINT | ✅ Used | ✅ Used | When set to `true`, ESLint configs that extend `eslint-config-react-app` will be used by `eslint-loader`. Any rules that are set to `"error"` will stop the application from building. |
|
||||
| TSC_COMPILE_ON_ERROR | ✅ Used | ✅ Used | When set to `true`, you can run and properly build TypeScript projects even if there are TypeScript type check errors. These errors are printed as warnings in the terminal and/or browser console. |
|
||||
|
||||
Reference in New Issue
Block a user