@@ -5,13 +5,13 @@ const replace = require('rollup-plugin-replace')
5
5
const flow = require ( 'rollup-plugin-flow-no-whitespace' )
6
6
const path = require ( 'path' )
7
7
8
- const Vue = require ( 'vue/package.json' )
9
- const NSVue = require ( '../package.json' )
8
+ const VueVersion = require ( 'vue/package.json' ) . version
9
+ const NSVueVersion = process . env . VERSION || require ( '../package.json' ) . version
10
10
11
11
const banner = ( name , version ) => `
12
12
/*!
13
- * ${ name } v${ version || NSVue . version }
14
- * (Using Vue v${ Vue . version } )
13
+ * ${ name } v${ version || NSVueVersion }
14
+ * (Using Vue v${ VueVersion } )
15
15
* (c) 2017-${ new Date ( ) . getFullYear ( ) } rigor789
16
16
* Released under the MIT license.
17
17
*/
@@ -64,11 +64,11 @@ const genConfig = (name) => {
64
64
plugins : [
65
65
replace ( {
66
66
__WEEX__ : false ,
67
- __VERSION__ : Vue . version ,
67
+ __VERSION__ : VueVersion ,
68
68
'process.env.NODE_ENV' : "'development'" ,
69
69
'let _isServer' : 'let _isServer = false' ,
70
- 'process.env.VUE_VERSION' : `'${ Vue . version } '` ,
71
- 'process.env.NS_VUE_VERSION' : `'${ NSVue . version } '`
70
+ 'process.env.VUE_VERSION' : `'${ VueVersion } '` ,
71
+ 'process.env.NS_VUE_VERSION' : `'${ NSVueVersion } '`
72
72
} ) ,
73
73
flow ( ) ,
74
74
buble ( ) ,
0 commit comments