summaryrefslogtreecommitdiff
path: root/webpack.config.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-24 06:47:51 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-24 06:47:51 +0900
commit22c4e927281b84b80f6485b5ba95fa32e8e201a4 (patch)
tree2ee4cab65270a620d51cddad6361ca1c43c71a58 /webpack.config.ts
parentUpdate url-preview.ts (diff)
downloadsharkey-22c4e927281b84b80f6485b5ba95fa32e8e201a4.tar.gz
sharkey-22c4e927281b84b80f6485b5ba95fa32e8e201a4.tar.bz2
sharkey-22c4e927281b84b80f6485b5ba95fa32e8e201a4.zip
Resolve #3389
Diffstat (limited to 'webpack.config.ts')
-rw-r--r--webpack.config.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/webpack.config.ts b/webpack.config.ts
index aed417ea52..dc74c96d94 100644
--- a/webpack.config.ts
+++ b/webpack.config.ts
@@ -5,21 +5,22 @@
import * as fs from 'fs';
import * as webpack from 'webpack';
import chalk from 'chalk';
+import rndstr from 'rndstr';
const { VueLoaderPlugin } = require('vue-loader');
const WebpackOnBuildPlugin = require('on-build-webpack');
//const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
+const isProduction = process.env.NODE_ENV == 'production';
+
const constants = require('./src/const.json');
const locales = require('./locales');
const meta = require('./package.json');
-const version = meta.clientVersion;
+const version = isProduction ? meta.clientVersion : meta.clientVersion + '-' + rndstr({ length: 8, chars: '0-9a-z' });
const codename = meta.codename;
-const isProduction = process.env.NODE_ENV == 'production';
-
const postcss = {
loader: 'postcss-loader',
options: {