mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:17:08 +00:00
Inject frontend version as environment variable
This commit is contained in:
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user