File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -15,5 +15,8 @@ module.exports = {
15
15
'arrow-parens' : 0 ,
16
16
// allow debugger during development
17
17
'no-debugger' : process . env . NODE_ENV === 'production' ? 2 : 0
18
+ } ,
19
+ "globals" : {
20
+ "LIB_VERSION" : true
18
21
}
19
22
}
Original file line number Diff line number Diff line change 1
1
'use strict'
2
+ const webpack = require ( 'webpack' )
2
3
const path = require ( 'path' )
3
4
const utils = require ( './utils' )
4
5
const config = require ( '../config' )
5
6
const vueLoaderConfig = require ( './vue-loader.conf' )
7
+ const npmCfg = require ( '../package.json' )
6
8
7
9
function resolve ( dir ) {
8
10
return path . join ( __dirname , '..' , dir )
@@ -72,5 +74,10 @@ module.exports = {
72
74
}
73
75
}
74
76
]
75
- }
77
+ } ,
78
+ plugins : [
79
+ new webpack . DefinePlugin ( {
80
+ LIB_VERSION : JSON . stringify ( npmCfg . version )
81
+ } )
82
+ ]
76
83
}
Original file line number Diff line number Diff line change 1
1
import mixins from './mixins/index.js'
2
- import npmCfg from '../package.json'
2
+
3
3
import {
4
4
Bar ,
5
5
HorizontalBar ,
@@ -13,7 +13,7 @@ import {
13
13
} from './BaseCharts'
14
14
15
15
const VueCharts = {
16
- version : npmCfg . version ,
16
+ version : LIB_VERSION ,
17
17
Bar,
18
18
HorizontalBar,
19
19
Doughnut,
You can’t perform that action at this time.
0 commit comments