Skip to content

Commit 3ceb8ec

Browse files
authored
don't use ?? because its not supported til es2020 (#72)
1 parent 0b67af9 commit 3ceb8ec

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/react-scripts/config/webpack.config.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const {
5050
BanBackendImportsPlugin,
5151
CopyBentleyStaticResourcesPlugin,
5252
CopyStaticAssetsPlugin,
53-
IModeljsLibraryExportsPlugin
53+
IModeljsLibraryExportsPlugin,
5454
} = require('@bentley/webpack-tools-core');
5555

5656
// iModel.js change to support using the fast-sass-loader instead of sass-loader.
@@ -137,7 +137,9 @@ module.exports = function (webpackEnv) {
137137
const shouldUseReactRefresh = env.raw.FAST_REFRESH;
138138

139139
if (env.raw.IMJS_URL_PREFIX === undefined) {
140-
env.stringified["process.env"].IMJS_URL_PREFIX = `(globalThis.IMJS_URL_PREFIX ?? "")`;
140+
env.stringified[
141+
'process.env'
142+
].IMJS_URL_PREFIX = `(globalThis.IMJS_URL_PREFIX ? globalThis.IMJS_URL_PREFIX : "")`;
141143
}
142144

143145
// common function to get style loaders
@@ -479,7 +481,7 @@ module.exports = function (webpackEnv) {
479481
rules: [
480482
// Disable require.ensure as it's not a standard language feature.
481483
// Add support for magic comments in commonjs modules (i.e. webpackIgnore for dynamic imports)
482-
{ parser: { requireEnsure: false, commonjsMagicComments: true} },
484+
{ parser: { requireEnsure: false, commonjsMagicComments: true } },
483485
{
484486
// iModel.js Changes
485487
// always use source-map-loader and use strip-assert-loader on production builds;

packages/react-scripts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bentley/react-scripts",
3-
"version": "4.0.6",
3+
"version": "4.0.7",
44
"description": "iModel.js configuration and scripts for Create React App.",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)