fix: remove redundant env settings from explorer (#732)

* fix: remove redundant env settings from explorer

* fix: format
This commit is contained in:
botond 2022-07-08 15:23:28 +01:00 committed by GitHub
parent 86310d7bb1
commit d1c4924d66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,5 @@
const { execSync } = require('child_process');
const webpack = require('webpack');
const SentryPlugin = require('@sentry/webpack-plugin');
const gitCommitHash = execSync('git rev-parse HEAD').toString();
const gitOriginUrl = execSync('git remote get-url origin')
.toString()
.replace('ssh://git@github.com', 'https://github.com')
.replace('.git', '');
module.exports = (config, context) => {
const additionalPlugins = process.env.SENTRY_AUTH_TOKEN
? [
@ -20,13 +12,6 @@ module.exports = (config, context) => {
return {
...config,
plugins: [
...additionalPlugins,
...config.plugins,
new webpack.DefinePlugin({
'process.env.GIT_COMMIT_HASH': JSON.stringify(gitCommitHash),
'process.env.GIT_ORIGIN_URL': JSON.stringify(gitOriginUrl),
}),
],
plugins: [...additionalPlugins, ...config.plugins],
};
};