mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 09:27:07 +00:00
Inject frontend version as environment variable
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
|
const { execSync } = require('child_process');
|
||||||
|
|
||||||
|
const gitDescribe = execSync('git describe --tags --always', { encoding: 'utf8' }).trim();
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"transpileDependencies": [
|
"transpileDependencies": [
|
||||||
@@ -48,7 +51,11 @@ module.exports = {
|
|||||||
// https://github.com/webpack/changelog-v5/issues/10
|
// https://github.com/webpack/changelog-v5/issues/10
|
||||||
new webpack.ProvidePlugin({
|
new webpack.ProvidePlugin({
|
||||||
Buffer: ['buffer', 'Buffer'],
|
Buffer: ['buffer', 'Buffer'],
|
||||||
})
|
}),
|
||||||
|
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env.DOUGAL_FRONTEND_VERSION': JSON.stringify(gitDescribe),
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
|||||||
Reference in New Issue
Block a user