diff --git a/README.md b/README.md index ebaaa7917..2300fc11d 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ npm start In general, most upgrades won't require any migration steps to work, but if you experience problems after an upgrade, please file an issue, and we'll add it to the list of migration steps below. +### From `<2.16.0` to `>=2.16.0` + +Since `2.16.0`, the template uses different `tsconfig` files for both development and production mode. For the latter, unfortunately, the path resolver is not smart enough to fall back to the basic `tsconfig.json` in case the expected `tsconfig.prod.json` is not present, so you have to create this file manually like shown [here](https://github.com/wmonk/create-react-app-typescript/blob/master/packages/react-scripts/template/tsconfig.prod.json). + ### From `<2.13.0` to `>=2.13.0` Since `2.13.0`, `typescript` is listed as a peer dependency of `react-scripts-ts`. For projects generated with at least this version, the init script takes care of properly installing it as dev dependency to the generated projects. Older projects require manual installation, in case you have not already done that. diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index c267bf011..7cb33afd0 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -131,7 +131,7 @@ module.exports = { // please link the files into your node_modules/ and let module-resolution kick in. // Make sure your source files are compiled, as they will not be processed in any way. new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]), - new TsconfigPathsPlugin({ configFile: paths.appTsConfig }), + new TsconfigPathsPlugin({ configFile: paths.appTsProdConfig }), ], }, module: { @@ -183,7 +183,7 @@ module.exports = { options: { // disable type checker - we will use it in fork plugin transpileOnly: true, - configFile: paths.appTsProdConfig + configFile: paths.appTsProdConfig, }, }, ], @@ -333,7 +333,7 @@ module.exports = { // Enable file caching cache: true, sourceMap: shouldUseSourceMap, - }), // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`. + }), // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`. new ExtractTextPlugin({ filename: cssFilename, }), diff --git a/packages/react-scripts/scripts/eject.js b/packages/react-scripts/scripts/eject.js index 59f385a7f..d4339eb16 100644 --- a/packages/react-scripts/scripts/eject.js +++ b/packages/react-scripts/scripts/eject.js @@ -208,12 +208,6 @@ inquirer presets: ['react-app'], }; - // Add ESlint config - console.log(` Adding ${cyan('ESLint')} configuration`); - appPackage.eslintConfig = { - extends: 'react-app', - }; - fs.writeFileSync( path.join(appPath, 'package.json'), JSON.stringify(appPackage, null, 2) + '\n' diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index c773d2435..d5b4fc98a 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -2217,9 +2217,6 @@ GitHub Pages doesn’t support routers that use the HTML5 `pushState` history AP * You could switch from using HTML5 history API to routing with hashes. If you use React Router, you can switch to `hashHistory` for this effect, but the URL will be longer and more verbose (for example, `http://user.github.io/todomvc/#/todos/42?_k=yknaj`). [Read more](https://reacttraining.com/react-router/web/api/Router) about different history implementations in React Router. * Alternatively, you can use a trick to teach GitHub Pages to handle 404 by redirecting to your `index.html` page with a special redirect parameter. You would need to add a `404.html` file with the redirection code to the `build` folder before deploying your project, and you’ll need to add code handling the redirect parameter to `index.html`. You can find a detailed explanation of this technique [in this guide](https://github.com/rafrex/spa-github-pages). -<<<<<<< HEAD -### Heroku -======= #### Troubleshooting ##### "/dev/tty: No such a device or address" @@ -2231,7 +2228,6 @@ If, when deploying, you get `/dev/tty: No such a device or address` or a similar 3. Try `npm run deploy again` ### [Heroku](https://www.heroku.com/) ->>>>>>> dfbc71ce2ae07547a8544cce14a1a23fac99e071 Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack).
You can find instructions in [Deploying React with Zero Configuration](https://blog.heroku.com/deploying-react-with-zero-configuration). diff --git a/packages/react-scripts/template/tslint.json b/packages/react-scripts/template/tslint.json index 67823d8e1..bfdc862cf 100644 --- a/packages/react-scripts/template/tslint.json +++ b/packages/react-scripts/template/tslint.json @@ -3,7 +3,8 @@ "linterOptions": { "exclude": [ "config/**/*.js", - "node_modules/**/*.ts" + "node_modules/**/*.ts", + "coverage/lcov-report/*.js" ] } } diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index 1aa55a907..9a3f895a5 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -160,7 +160,10 @@ E2E_FILE=./build/index.html \ # ****************************************************************************** # Eject... -echo yes | npm run eject +echo yes | yarn eject + +# Ensure all packages are installed properly. +yarn # Link to test module npm link "$temp_module_path/node_modules/test-integrity"