From 29d125721c81c57be8e2b3a214a12263cd898357 Mon Sep 17 00:00:00 2001 From: Lachlan Miller Date: Sat, 5 Jun 2021 00:12:57 +1000 Subject: [PATCH] fix: default object to destructure --- .../plugins/react-scripts/findReactScriptsWebpackConfig.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/npm/react/plugins/react-scripts/findReactScriptsWebpackConfig.js b/npm/react/plugins/react-scripts/findReactScriptsWebpackConfig.js index 1bd184ae1d1e..5abc187f5eaa 100644 --- a/npm/react/plugins/react-scripts/findReactScriptsWebpackConfig.js +++ b/npm/react/plugins/react-scripts/findReactScriptsWebpackConfig.js @@ -6,7 +6,9 @@ const { addCypressToWebpackEslintRulesInPlace } = require('../utils/eslint-helpe const { getTranspileFolders } = require('../utils/get-transpile-folders') const { addFolderToBabelLoaderTranspileInPlace } = require('../utils/babel-helpers') -module.exports = function findReactScriptsWebpackConfig (config, { webpackConfigPath = 'react-scripts/config/webpack.config' }) { +module.exports = function findReactScriptsWebpackConfig (config, { + webpackConfigPath, +} = { webpackConfigPath: 'react-scripts/config/webpack.config' }) { // this is required because // 1) we use our own HMR and we don't need react-refresh transpiling overhead // 2) it doesn't work with process.env=test @see https://github.com/cypress-io/cypress-realworld-app/pull/832