[Dev] Fix dev mode on Windows (#1722)
This commit is contained in:
parent
d6a9ba5683
commit
1b024ee01c
@ -4,7 +4,7 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"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": "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: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",
|
"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 gitRevisionPlugin = new GitRevisionPlugin();
|
||||||
const branch = process.env.HEAD || gitRevisionPlugin.branch();
|
const branch = process.env.HEAD || gitRevisionPlugin.branch();
|
||||||
const appRevision = (!branch || branch === 'HEAD') ? gitRevisionPlugin.commithash().substring(0, 7) : branch;
|
const appRevision = (!branch || branch === 'HEAD') ? gitRevisionPlugin.commithash().substring(0, 7) : branch;
|
||||||
|
const appVersion = require('./package.json').version;
|
||||||
|
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
@ -121,7 +122,7 @@ module.exports = (env = {}, argv = {}) => {
|
|||||||
new EnvironmentPlugin({
|
new EnvironmentPlugin({
|
||||||
APP_ENV: 'production',
|
APP_ENV: 'production',
|
||||||
APP_NAME: null,
|
APP_NAME: null,
|
||||||
APP_VERSION: undefined,
|
APP_VERSION: appVersion,
|
||||||
APP_REVISION: appRevision,
|
APP_REVISION: appRevision,
|
||||||
TELEGRAM_T_API_ID: undefined,
|
TELEGRAM_T_API_ID: undefined,
|
||||||
TELEGRAM_T_API_HASH: undefined,
|
TELEGRAM_T_API_HASH: undefined,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user