diff --git a/config-overrides.js b/config-overrides.js
index d50d08de47..98185f0970 100644
--- a/config-overrides.js
+++ b/config-overrides.js
@@ -2,7 +2,6 @@ const path = require('path');
const MiniCSSExtractPlugin = require('mini-css-extract-plugin');
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
-const webpack = require('webpack');
const srcRoot = path.resolve(__dirname, 'src');
const uiKitRoot = path.resolve(__dirname, 'node_modules/@gravity-ui/uikit');
const antlr4C3Root = path.resolve(__dirname, 'node_modules/antlr4-c3');
@@ -10,8 +9,6 @@ const websqlRoot = path.resolve(__dirname, 'node_modules/@gravity-ui/websql-auto
const antlr4ngRoot = path.resolve(__dirname, 'node_modules/antlr4ng');
const uiKitIconsRoot = path.resolve(__dirname, 'node_modules/@gravity-ui/icons');
-const packageJson = require('./package.json');
-
module.exports = {
webpack: (config, env) => {
const oneOfRule = config.module.rules.find((r) => r.oneOf);
@@ -48,13 +45,6 @@ module.exports = {
}),
);
- // Add DefinePlugin to expose just the version
- config.plugins.push(
- new webpack.DefinePlugin({
- 'process.env.UI_VERSION': JSON.stringify(packageJson.version),
- }),
- );
-
const cssExtractPlugin = config.plugins.find((p) => p instanceof MiniCSSExtractPlugin);
if (cssExtractPlugin) {
cssExtractPlugin.options.ignoreOrder = true;
diff --git a/package-lock.json b/package-lock.json
index aa5fc93c2c..65c84ea98e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -101,8 +101,7 @@
"source-map-explorer": "^2.5.3",
"stylelint": "^15.11.0",
"ts-jest": "^29.2.5",
- "typescript": "^5.7.3",
- "webpack": "^5.98.0"
+ "typescript": "^5.7.3"
},
"peerDependencies": {
"monaco-yql-languages": ">=1.3.0",
diff --git a/package.json b/package.json
index fd88573a8c..8243aeaa2d 100644
--- a/package.json
+++ b/package.json
@@ -164,8 +164,7 @@
"source-map-explorer": "^2.5.3",
"stylelint": "^15.11.0",
"ts-jest": "^29.2.5",
- "typescript": "^5.7.3",
- "webpack": "^5.98.0"
+ "typescript": "^5.7.3"
},
"peerDependencies": {
"monaco-yql-languages": ">=1.3.0",
diff --git a/public/index.html b/public/index.html
index ba627094c8..868f82eab2 100644
--- a/public/index.html
+++ b/public/index.html
@@ -21,10 +21,10 @@
YDB Monitoring
diff --git a/src/components/ErrorBoundary/utils.tsx b/src/components/ErrorBoundary/utils.tsx
index e7c154b5cb..8c2367cae2 100644
--- a/src/components/ErrorBoundary/utils.tsx
+++ b/src/components/ErrorBoundary/utils.tsx
@@ -1,5 +1,7 @@
import {prepareErrorMessage} from '../../utils/prepareErrorMessage';
+import packageJson from '../../../package.json';
+
export async function collectDiagnosticsData(error: Error) {
return await getBackendVersion().then((backendVersion) => {
return {
@@ -9,7 +11,7 @@ export async function collectDiagnosticsData(error: Error) {
message: prepareErrorMessage(error),
stack: prepareErrorStack(error.stack, {trim: true, maxLines: 10}),
},
- uiVersion: process.env.UI_VERSION,
+ uiVersion: packageJson.version,
backendVersion,
};
});
diff --git a/src/containers/UserSettings/settings.tsx b/src/containers/UserSettings/settings.tsx
index 57907ef0a0..5a8692afe5 100644
--- a/src/containers/UserSettings/settings.tsx
+++ b/src/containers/UserSettings/settings.tsx
@@ -21,6 +21,8 @@ import {Lang, defaultLang} from '../../utils/i18n';
import type {SettingProps, SettingsInfoFieldProps} from './Setting';
import i18n from './i18n';
+import packageJson from '../../../package.json';
+
export interface SettingsSection {
id: string;
title: string;
@@ -141,7 +143,7 @@ export const autocompleteOnEnterSetting: SettingProps = {
export const interfaceVersionInfoField: SettingsInfoFieldProps = {
title: i18n('settings.about.interfaceVersionInfoField.title'),
type: 'info',
- content: process.env.UI_VERSION,
+ content: packageJson.version,
};
export const appearanceSection: SettingsSection = {
diff --git a/src/store/configureStore.ts b/src/store/configureStore.ts
index 1e3bff38c4..cbdddc0ab4 100644
--- a/src/store/configureStore.ts
+++ b/src/store/configureStore.ts
@@ -28,12 +28,12 @@ function _configureStore<
preloadedState,
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
- immutableCheck: process.env.REACT_APP_DISABLE_CHECKS
+ immutableCheck: window.react_app_disable_checks
? false
: {
ignoredPaths: ['tooltip.currentHoveredRef'],
},
- serializableCheck: process.env.REACT_APP_DISABLE_CHECKS
+ serializableCheck: window.react_app_disable_checks
? false
: {
ignoredPaths: ['tooltip.currentHoveredRef', 'api'],
diff --git a/src/types/window.d.ts b/src/types/window.d.ts
index c6855bc419..0b9398ec28 100644
--- a/src/types/window.d.ts
+++ b/src/types/window.d.ts
@@ -39,7 +39,8 @@ interface Window {
meta_backend?: string;
code_assist_backend?: string;
- userSettings?: import('../services/settings').SettingsObject;
+ react_app_disable_checks?: boolean;
+
systemSettings?: import('../services/settings').SettingsObject;
api: import('../services/api/index').YdbEmbeddedAPI;