Skip to content

Commit 4a97195

Browse files
feat(ErrorBoundary): rework error page (#1983)
1 parent 9c0c6f8 commit 4a97195

File tree

21 files changed

+612
-191
lines changed

21 files changed

+612
-191
lines changed

config-overrides.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ const path = require('path');
22

33
const MiniCSSExtractPlugin = require('mini-css-extract-plugin');
44
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
5+
const webpack = require('webpack');
56
const srcRoot = path.resolve(__dirname, 'src');
67
const uiKitRoot = path.resolve(__dirname, 'node_modules/@gravity-ui/uikit');
78
const antlr4C3Root = path.resolve(__dirname, 'node_modules/antlr4-c3');
89
const websqlRoot = path.resolve(__dirname, 'node_modules/@gravity-ui/websql-autocomplete');
910
const antlr4ngRoot = path.resolve(__dirname, 'node_modules/antlr4ng');
1011
const uiKitIconsRoot = path.resolve(__dirname, 'node_modules/@gravity-ui/icons');
1112

13+
const packageJson = require('./package.json');
14+
1215
module.exports = {
1316
webpack: (config, env) => {
1417
const oneOfRule = config.module.rules.find((r) => r.oneOf);
@@ -45,6 +48,13 @@ module.exports = {
4548
}),
4649
);
4750

51+
// Add DefinePlugin to expose just the version
52+
config.plugins.push(
53+
new webpack.DefinePlugin({
54+
'process.env.UI_VERSION': JSON.stringify(packageJson.version),
55+
}),
56+
);
57+
4858
const cssExtractPlugin = config.plugins.find((p) => p instanceof MiniCSSExtractPlugin);
4959
if (cssExtractPlugin) {
5060
cssExtractPlugin.options.ignoreOrder = true;

0 commit comments

Comments
 (0)