Skip to content

Commit 0d1521a

Browse files
pmadargaearon
authored andcommitted
Remove connect-history-api-fallback and cross-spawn dependencies from react-scripts (#751) (#2320)
1 parent 7e25c9a commit 0d1521a

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
10+
'use strict';
11+
12+
var crossSpawn = require('cross-spawn');
13+
14+
module.exports = crossSpawn;

packages/react-dev-utils/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"checkRequiredFiles.js",
1616
"clearConsole.js",
1717
"crashOverlay.js",
18+
"crossSpawn.js",
1819
"eslintFormatter.js",
1920
"FileSizeReporter.js",
2021
"formatWebpackMessages.js",

packages/react-scripts/bin/react-scripts.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
'use strict';
1212

13-
const spawn = require('cross-spawn');
13+
const spawn = require('react-dev-utils/crossSpawn');
1414
const script = process.argv[2];
1515
const args = process.argv.slice(3);
1616

packages/react-scripts/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
"babel-runtime": "6.23.0",
3131
"case-sensitive-paths-webpack-plugin": "1.1.4",
3232
"chalk": "1.1.3",
33-
"connect-history-api-fallback": "1.3.0",
34-
"cross-spawn": "4.0.2",
3533
"css-loader": "0.28.1",
3634
"dotenv": "4.0.0",
3735
"eslint": "3.19.0",

packages/react-scripts/scripts/eject.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ process.on('unhandledRejection', err => {
1919
const fs = require('fs-extra');
2020
const path = require('path');
2121
const execSync = require('child_process').execSync;
22-
const spawnSync = require('cross-spawn').sync;
2322
const chalk = require('chalk');
2423
const paths = require('../config/paths');
2524
const createJestConfig = require('./utils/createJestConfig');
2625
const inquirer = require('react-dev-utils/inquirer');
26+
const spawnSync = require('react-dev-utils/crossSpawn').sync;
2727

2828
const green = chalk.green;
2929
const cyan = chalk.cyan;

packages/react-scripts/scripts/init.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ process.on('unhandledRejection', err => {
1818

1919
const fs = require('fs-extra');
2020
const path = require('path');
21-
const spawn = require('cross-spawn');
2221
const chalk = require('chalk');
22+
const spawn = require('react-dev-utils/crossSpawn');
2323

2424
module.exports = function(
2525
appPath,

0 commit comments

Comments
 (0)