[Dev] Fix dev mode on Windows (#1722)
This commit is contained in:
parent
d6a9ba5683
commit
1b024ee01c
@ -4,7 +4,7 @@
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"dev": "cross-env APP_ENV=development APP_VERSION=$(npm run print_version --silent) webpack serve --env mode=dev --env isDevServer --mode development --config ./webpack.config.js",
|
||||
"dev": "cross-env APP_ENV=development webpack serve --env mode=dev --env isDevServer --mode development --config ./webpack.config.js",
|
||||
"build": "webpack --mode production",
|
||||
"build:staging": "rm -rf dist/ && APP_ENV=staging APP_VERSION=$(npm run print_version --silent) npm run build && ./deploy/copy_to_dist.sh",
|
||||
"build:production": "npm i && rm -rf dist/ && APP_VERSION=$(npm run inc_version --silent) APP_ENV=production npm run build && ./deploy/copy_to_dist.sh",
|
||||
|
||||
@ -14,6 +14,7 @@ const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
|
||||
const gitRevisionPlugin = new GitRevisionPlugin();
|
||||
const branch = process.env.HEAD || gitRevisionPlugin.branch();
|
||||
const appRevision = (!branch || branch === 'HEAD') ? gitRevisionPlugin.commithash().substring(0, 7) : branch;
|
||||
const appVersion = require('./package.json').version;
|
||||
|
||||
dotenv.config();
|
||||
|
||||
@ -121,7 +122,7 @@ module.exports = (env = {}, argv = {}) => {
|
||||
new EnvironmentPlugin({
|
||||
APP_ENV: 'production',
|
||||
APP_NAME: null,
|
||||
APP_VERSION: undefined,
|
||||
APP_VERSION: appVersion,
|
||||
APP_REVISION: appRevision,
|
||||
TELEGRAM_T_API_ID: undefined,
|
||||
TELEGRAM_T_API_HASH: undefined,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user