diff --git a/lib/www/client/source/vue.config.js b/lib/www/client/source/vue.config.js index 50b7d24..051b416 100644 --- a/lib/www/client/source/vue.config.js +++ b/lib/www/client/source/vue.config.js @@ -1,4 +1,7 @@ const webpack = require('webpack'); +const { execSync } = require('child_process'); + +const gitDescribe = execSync('git describe --tags --always', { encoding: 'utf8' }).trim(); module.exports = { "transpileDependencies": [ @@ -48,7 +51,11 @@ module.exports = { // https://github.com/webpack/changelog-v5/issues/10 new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'], - }) + }), + + new webpack.DefinePlugin({ + 'process.env.DOUGAL_FRONTEND_VERSION': JSON.stringify(gitDescribe), + }), ], module: { rules: [