@@ -1,4 +1,5 @@
const buble = require('rollup-plugin-buble')
+const replace = require('rollup-plugin-replace')
const version = process.env.VERSION || require('../package.json').version
module.exports = {
@@ -6,7 +7,10 @@ module.exports = {
dest: 'dist/vuex.js',
format: 'umd',
moduleName: 'Vuex',
- plugins: [buble()],
+ plugins: [
+ replace({ __VERSION__: version }),
+ buble()
+ ],
banner:
`/**
* vuex v${version}
@@ -57,6 +57,7 @@
"phantomjs-prebuilt": "^2.1.7",
"rollup": "^0.34.13",
"rollup-plugin-buble": "^0.14.0",
+ "rollup-plugin-replace": "^1.1.1",
"rollup-watch": "^2.5.0",
"selenium-server": "^2.53.1",
"todomvc-app-css": "^2.0.3",
@@ -414,6 +414,7 @@ if (typeof window !== 'undefined' && window.Vue) {
export default {
Store,
install,
+ version: '__VERSION__',
mapState,
mapMutations,
mapGetters,