File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const defaultSettings = {
8
8
debugLog : false ,
9
9
filename : '[hash].[ext]' ,
10
10
buildNameSuffix : '' ,
11
+ overrideVersion : false ,
11
12
gTagTrackingId : '' ,
12
13
}
13
14
@@ -65,7 +66,7 @@ function build(settings) {
65
66
__npm_package_name__ : JSON . stringify (
66
67
`${ process . env . npm_package_name } -${ process . env . npm_package_version } ${ settings . buildNameSuffix } `
67
68
) ,
68
- __npm_package_version__ : JSON . stringify ( process . env . npm_package_version )
69
+ __npm_package_version__ : JSON . stringify ( settings . overrideVersion || process . env . npm_package_version )
69
70
} )
70
71
]
71
72
}
Original file line number Diff line number Diff line change @@ -3,12 +3,15 @@ const common = require('./webpack.common.js');
3
3
const webpack = require ( 'webpack' ) ;
4
4
const os = require ( 'os' ) ;
5
5
6
+ const devTag = `dev-${ os . hostname ( ) } ` ;
7
+
6
8
const settings = {
7
9
hmr : true ,
8
10
sourceMap : true ,
9
11
debugLog : true ,
10
12
filename : '[name]-[hash:8].[ext]' ,
11
- buildNameSuffix : `-dev-${ os . hostname ( ) } `
13
+ buildNameSuffix : `-${ devTag } ` ,
14
+ overrideVersion : devTag
12
15
}
13
16
14
17
module . exports = merge ( common . build ( settings ) , {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ const common = require('./webpack.common.js');
3
3
4
4
const settings = {
5
5
buildNameSuffix : `-prod-${ new Date ( ) . toISOString ( ) } ` ,
6
+ overrideVersion : process . env . OVERRIDE_VERSION ,
6
7
gTagTrackingId : 'UA-34174762-4' ,
7
8
}
8
9
You can’t perform that action at this time.
0 commit comments