From 66fcd54b7670593468497880ebb9daae7bc9913b Mon Sep 17 00:00:00 2001 From: Simen Fivelstad Smaaberg <66635118+simensma-fresh@users.noreply.github.com> Date: Fri, 15 Dec 2023 10:39:53 -0800 Subject: [PATCH] [CHORE] Fixed error saying Canada/Pacific tz data is not found (#2856) Fixed locale issue --- services/core-web/webpack.config.ts | 32 ++++++++++++------------ services/minespace-web/webpack.config.ts | 24 +++++++++--------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/services/core-web/webpack.config.ts b/services/core-web/webpack.config.ts index 23ebd45755..462a2c4b3f 100755 --- a/services/core-web/webpack.config.ts +++ b/services/core-web/webpack.config.ts @@ -80,18 +80,18 @@ const commonConfig = merge([ REQUEST_HEADER: path.resolve(__dirname, "common/utils/RequestHeaders.js"), GLOBAL_ROUTES: path.resolve(__dirname, "src/constants/routes.ts"), }), - // Prevent moment locales to be bundled with the app - // to reduce app size - new webpack.IgnorePlugin({ - resourceRegExp: /^\.\/locale$/, - contextRegExp: /moment$/, - }), - // Explicitly load timezone data for Canada and US - new MomentTimezoneDataPlugin({ - startYear: 1900, - endYear: 2300, - matchCountries: ["CA", "US"], - }), + // // Prevent moment locales to be bundled with the app + // // to reduce app size + // new webpack.IgnorePlugin({ + // resourceRegExp: /^\.\/locale$/, + // contextRegExp: /moment$/, + // }), + // // Explicitly load timezone data for Canada and US + // new MomentTimezoneDataPlugin({ + // startYear: 1900, + // endYear: 2300, + // matchCountries: ["CA", "US"], + // }), new MiniCssExtractPlugin(), ], resolve: { @@ -100,8 +100,8 @@ const commonConfig = merge([ ...PATH_ALIASES, ...(process.env.NODE_ENV === "development" ? { - "react-dom": "@hot-loader/react-dom", - } + "react-dom": "@hot-loader/react-dom", + } : {}), // Use lodash-es that supports proper tree-shaking lodash: "lodash-es", @@ -246,8 +246,8 @@ const prodConfig = merge([ generateStatsFile: true, statsOptions: { source: false }, }), - ] - } + ], + }, ]); module.exports = () => { diff --git a/services/minespace-web/webpack.config.ts b/services/minespace-web/webpack.config.ts index 9bd9d292e8..564052826d 100755 --- a/services/minespace-web/webpack.config.ts +++ b/services/minespace-web/webpack.config.ts @@ -89,18 +89,18 @@ const commonConfig = merge([ REQUEST_HEADER: path.resolve(__dirname, "common/utils/RequestHeaders.js"), GLOBAL_ROUTES: path.resolve(__dirname, "src/constants/routes.ts"), }), - // Prevent moment locales to be bundled with the app - // to reduce app size - new webpack.IgnorePlugin({ - resourceRegExp: /^\.\/locale$/, - contextRegExp: /moment$/, - }), - // Explicitly load timezone data for Canada and US - new MomentTimezoneDataPlugin({ - startYear: 1900, - endYear: 2300, - matchCountries: ["CA", "US"], - }), + // // Prevent moment locales to be bundled with the app + // // to reduce app size + // new webpack.IgnorePlugin({ + // resourceRegExp: /^\.\/locale$/, + // contextRegExp: /moment$/, + // }), + // // Explicitly load timezone data for Canada and US + // new MomentTimezoneDataPlugin({ + // startYear: 1900, + // endYear: 2300, + // matchCountries: ["CA", "US"], + // }), new MiniCssExtractPlugin(), ], resolve: {