Remove version definition from the application and pass it on build time

This commit is contained in:
ErickSkrauch 2018-03-17 19:13:12 +03:00
parent 83c72e795d
commit cb00d0c712
3 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,6 @@
module.exports = { module.exports = {
version: 'dev',
apiHost: 'https://dev.account.ely.by', apiHost: 'https://dev.account.ely.by',
ga: {id: 'UA-XXXXX-Y'}, ga: {id: 'UA-XXXXX-Y'},
sentryCdn: 'https://<key>@sentry.io/<project>' sentryCdn: 'https://<key>@sentry.io/<project>',
}; };

View File

@ -1,6 +1,5 @@
{ {
"name": "ely-by-account", "name": "ely-by-account",
"version": "1.1.25-dev",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"author": "ErickSkrauch <erickskrauch@ely.by>", "author": "ErickSkrauch <erickskrauch@ely.by>",

View File

@ -118,7 +118,7 @@ const webpackConfig = {
'process.env': { 'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV), NODE_ENV: JSON.stringify(process.env.NODE_ENV),
APP_ENV: JSON.stringify(config.environment || process.env.NODE_ENV), APP_ENV: JSON.stringify(config.environment || process.env.NODE_ENV),
__VERSION__: JSON.stringify(packageJson.version), __VERSION__: JSON.stringify(config.version || ''),
__DEV__: !isProduction, __DEV__: !isProduction,
__TEST__: isTest, __TEST__: isTest,
__PROD__: isProduction __PROD__: isProduction