Merge pull request #2421 from SergioCrisostomo/use-packagejson-version
use version from package.json
This commit is contained in:
commit
1ec1efa157
2 changed files with 7 additions and 2 deletions
|
@ -3,6 +3,8 @@
|
|||
*/
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const package = require('../package.json');
|
||||
|
||||
function resolve (dir) {
|
||||
return path.join(__dirname, '..', dir);
|
||||
}
|
||||
|
@ -66,6 +68,9 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.ModuleConcatenationPlugin()
|
||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.VERSION': `'${package.version}'`
|
||||
}),
|
||||
]
|
||||
};
|
||||
|
|
|
@ -153,7 +153,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|||
}
|
||||
|
||||
const API = {
|
||||
version: '2.7.2',
|
||||
version: process.env.VERSION, // eslint-disable-line no-undef
|
||||
locale: locale.use,
|
||||
i18n: locale.i18n,
|
||||
install,
|
||||
|
|
Loading…
Add table
Reference in a new issue