resolve race condition when creating rd.json

This commit is contained in:
Bastian Ike
2021-01-25 15:01:24 +01:00
parent e6830ec131
commit 872df4972c

View File

@@ -13,14 +13,9 @@ process.on('unhandledRejection', err => {
throw err; throw err;
}); });
// create radar
require('../bin/tasks/radarjson').radarJsonGenerator()
// Ensure environment variables are read. // Ensure environment variables are read.
require('../config/env'); require('../config/env');
const path = require('path'); const path = require('path');
const chalk = require('react-dev-utils/chalk'); const chalk = require('react-dev-utils/chalk');
const fs = require('fs-extra'); const fs = require('fs-extra');
@@ -55,7 +50,8 @@ const config = configFactory('production');
// We require that you explicitly set browsers and do not fall back to // We require that you explicitly set browsers and do not fall back to
// browserslist defaults. // browserslist defaults.
const {checkBrowsers} = require('react-dev-utils/browsersHelper'); const {checkBrowsers} = require('react-dev-utils/browsersHelper');
checkBrowsers(paths.appPath, isInteractive) require('../bin/tasks/radarjson').radarJsonGenerator()
.then(checkBrowsers(paths.appPath, isInteractive))
.then(() => { .then(() => {
// First, read the current file sizes in build directory. // First, read the current file sizes in build directory.
// This lets us display how much they changed later. // This lets us display how much they changed later.
@@ -134,6 +130,7 @@ checkBrowsers(paths.appPath, isInteractive)
process.exit(1); process.exit(1);
}); });
// Create the production build and print the deployment instructions. // Create the production build and print the deployment instructions.
function build(previousFileSizes) { function build(previousFileSizes) {
// We used to support resolving modules according to `NODE_PATH`. // We used to support resolving modules according to `NODE_PATH`.
@@ -215,3 +212,4 @@ function copyPublicFolder() {
filter: file => file !== paths.appHtml, filter: file => file !== paths.appHtml,
}); });
} }