version added to env

This commit is contained in:
nklhrstv 2020-02-11 22:42:59 +02:00
parent 840dbd925b
commit cc97a79fa3
2 changed files with 3 additions and 0 deletions

View file

@ -118,6 +118,7 @@ const Settings = () => {
<Button className={classnames(styles['side-menu-button'], { [styles['selected']]: selectedSectionId === STREAMING_SECTION })} data-section={STREAMING_SECTION} onClick={sideMenuButtonOnClick}>
Streaming server
</Button>
{process.env.version}
</div>
<div ref={sectionsContainerRef} className={styles['sections-container']} onScroll={sectionsContainerOnScorll}>
<div ref={generalSectionRef} className={styles['section-container']}>

View file

@ -5,6 +5,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const pachageJson = require('./package.json');
module.exports = (env, argv) => ({
entry: './src/index.js',
@ -130,6 +131,7 @@ module.exports = (env, argv) => ({
plugins: [
new webpack.EnvironmentPlugin({
DEBUG: argv.mode !== 'production',
version: pachageJson.version,
...env
}),
new webpack.ProgressPlugin(),