diff --git a/client/settings/index.js b/client/settings/index.js
index 5f7d3d9212d..a73ac89baf4 100644
--- a/client/settings/index.js
+++ b/client/settings/index.js
@@ -11,7 +11,7 @@ import enqueueFraudScripts from 'fraud-scripts';
import SettingsManager from 'settings/settings-manager';
import ExpressCheckoutSettings from './express-checkout-settings';
import WCPaySettingsContext from './wcpay-settings-context';
-import ErrorBoundary from '../components/error-boundary';
+import AdminErrorBoundary from '../components/admin-error-boundary';
window.addEventListener( 'load', () => {
enqueueFraudScripts( wcpaySettings.fraudServices );
@@ -23,9 +23,9 @@ const settingsContainer = document.getElementById(
if ( settingsContainer ) {
ReactDOM.render(
-
+
-
+
,
settingsContainer
);
@@ -39,9 +39,9 @@ if ( expressCheckoutSettingsContainer ) {
ReactDOM.render(
-
+
-
+
,
expressCheckoutSettingsContainer
);
diff --git a/client/settings/payment-methods-section/index.js b/client/settings/payment-methods-section/index.js
index 48d39eb1633..b61fbf17d69 100644
--- a/client/settings/payment-methods-section/index.js
+++ b/client/settings/payment-methods-section/index.js
@@ -11,7 +11,7 @@ import { Card, CardHeader } from '@wordpress/components';
*/
import SettingsSection from '../settings-section';
import LoadableSettingsSection from '../loadable-settings-section';
-import ErrorBoundary from '../../components/error-boundary';
+import AdminErrorBoundary from '../../components/admin-error-boundary';
import { useGetAvailablePaymentMethodIds } from '../../data';
import CardBody from 'wcpay/settings/card-body';
import PaymentMethodsList from '../payment-methods-list';
@@ -60,7 +60,7 @@ const PaymentMethodsSection = () => {
id="payment-methods"
>
-
+
@@ -81,7 +81,7 @@ const PaymentMethodsSection = () => {
/>
-
+
);
diff --git a/client/settings/settings-manager/index.js b/client/settings/settings-manager/index.js
index 3da257c9074..7ca0b18f905 100644
--- a/client/settings/settings-manager/index.js
+++ b/client/settings/settings-manager/index.js
@@ -21,7 +21,7 @@ import Deposits from '../deposits';
import LoadableSettingsSection from '../loadable-settings-section';
import PaymentMethodsSection from '../payment-methods-section';
import BuyNowPayLaterSection from '../buy-now-pay-later-section';
-import ErrorBoundary from '../../components/error-boundary';
+import AdminErrorBoundary from '../../components/admin-error-boundary';
import {
useDepositDelayDays,
useGetDuplicatedPaymentMethodIds,
@@ -186,9 +186,9 @@ const SettingsManager = () => {
id="general"
>
-
+
-
+
{
description={ ExpressCheckoutDescription }
>
-
+
-
+
@@ -216,21 +216,21 @@ const SettingsManager = () => {
id="transactions"
>
-
+
-
+
@@ -239,9 +239,9 @@ const SettingsManager = () => {
id="fp-settings"
>
-
+
-
+
{
id="advanced-settings"
>
-
+
-
+
diff --git a/webpack/shared.js b/webpack/shared.js
index 2dce99ca3ec..7cc1b7e1c60 100644
--- a/webpack/shared.js
+++ b/webpack/shared.js
@@ -1,7 +1,7 @@
/* eslint-disable */
const path = require( 'path' );
const { mapValues } = require( 'lodash' );
-const { ProvidePlugin } = require( 'webpack' );
+const { ProvidePlugin, DefinePlugin, webpack } = require( 'webpack' );
const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' );
const WooCommerceDependencyExtractionWebpackPlugin = require( '@woocommerce/dependency-extraction-webpack-plugin' );
const WebpackRTLPlugin = require( './webpack-rtl-plugin' );
@@ -162,6 +162,11 @@ module.exports = {
}
},
} ),
+ new DefinePlugin( {
+ 'process.env.MODE': JSON.stringify(
+ process.env.NODE_ENV || 'development'
+ ),
+ } ),
],
resolveLoader: {
modules: [