Description
We are planning to release Create React App version 3.0 soon. This will be a relatively small release but will include a number of necessary breaking changes.
Planned Features
- Jest 24: Update to Jest 24 #6278
- Hooks ESLint plugin: Support React Hooks (#5602) #5997
- TypeScript ESLint plugin Add TypeScript linting support #6513
- Add browserslist support to @babel/preset-env: Support browserslist in @babel/preset-env #6608
- Absolute imports using
jsconfig.json
/tsconfig.json
: Set baseUrl from jsconfig.json/tsconfig.json #6656
Nice to Have Features
- babel-plugin-optimize-react: Adds Babel plugin babel-plugin-optimize-react #6219
Refer to the 3.0 Milestone to see exactly what is included in this release.
☢️ How Can I Test This Now? ☢️
We're happy you'd like to test the next version of react-scripts
! Before getting into the details, we'd like to make you aware of a few things:
- Features may be broken or not work as expected
- There will be more breaking changes introduced before the final release
⚠️ - Documentation for new features is still sparse, so look through the pull requests for how they're expected to work
You can install the latest alpha version of react-scripts
using one of the following commands:
$ # Create a new application
$ npx create-react-app@next --scripts-version=3.0.0-next.68 app-name
$ # Upgrade an existing application
$ yarn upgrade [email protected]
Upgrading from 2.0 to 3.0
-
The
browserslist
config in yourpackage.json
is now used to control the output of your JavaScript files. You can use separate configuration fordevelopment
andproduction
. Seecreate-react-app/packages/react-scripts/package.json
Lines 83 to 94 in b0cbf2c
-
We now have linting support for TypeScript files! If you're using Visual Studio Code, see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/setting-up-your-editor.md#displaying-lint-output-in-the-editor for tips to get syntax highlighting from the ESLint extension in your
.ts
and.tsx
files -
We now support setting
basePath
injsconfig.json
. To configurebasePath
to point to thesrc
directory create ajsconfig.json
file in your project root:{ "compilerOptions": { "baseUrl": "src" } }
Known Issues in 3.0 Alphas
File watching issue with Jest 24: Update Jest to fix watch bug #6646- Dynamic imports may not work in some cases: dynamic import are unrecognized in 3.0.0-next.b0cbf2ca, compile fails #6673
Please report any bugs you encounter or behavior you believe to be incorrect by creating a new issue. Have fun!