mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +08:00
Add preflight check to guard against wrong versions of webpack/eslint/jest higher up the tree (#3771)
* 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
This commit is contained in:
7
packages/react-scripts/scripts/start.js
vendored
7
packages/react-scripts/scripts/start.js
vendored
@@ -21,6 +21,13 @@ process.on('unhandledRejection', err => {
|
||||
|
||||
// Ensure environment variables are read.
|
||||
require('../config/env');
|
||||
// @remove-on-eject-begin
|
||||
// Do the preflight check (only happens before eject).
|
||||
const verifyPackageTree = require('./utils/verifyPackageTree');
|
||||
if (process.env.SKIP_PREFLIGHT_CHECK !== 'true') {
|
||||
verifyPackageTree();
|
||||
}
|
||||
// @remove-on-eject-end
|
||||
|
||||
const fs = require('fs');
|
||||
const chalk = require('chalk');
|
||||
|
||||
Reference in New Issue
Block a user