aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/webpack.config.js
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-22 01:41:44 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-22 01:41:44 +0800
commitffa2f4554b959b9af67d385d85fe9a4c822ad482 (patch)
tree0847a57e56597e78f571b99e600d54d55b4cd210 /packages/instant/webpack.config.js
parent22a31246622e7139185d080cae9bef275087e245 (diff)
downloaddexon-sol-tools-ffa2f4554b959b9af67d385d85fe9a4c822ad482.tar
dexon-sol-tools-ffa2f4554b959b9af67d385d85fe9a4c822ad482.tar.gz
dexon-sol-tools-ffa2f4554b959b9af67d385d85fe9a4c822ad482.tar.bz2
dexon-sol-tools-ffa2f4554b959b9af67d385d85fe9a4c822ad482.tar.lz
dexon-sol-tools-ffa2f4554b959b9af67d385d85fe9a4c822ad482.tar.xz
dexon-sol-tools-ffa2f4554b959b9af67d385d85fe9a4c822ad482.tar.zst
dexon-sol-tools-ffa2f4554b959b9af67d385d85fe9a4c822ad482.zip
Takeout redundant check, and make function name more clear
Diffstat (limited to 'packages/instant/webpack.config.js')
-rw-r--r--packages/instant/webpack.config.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js
index 466385db9..b08fabedf 100644
--- a/packages/instant/webpack.config.js
+++ b/packages/instant/webpack.config.js
@@ -67,7 +67,7 @@ const getRollbarPlugin = environmentName => {
return new RollbarSourceMapPlugin(rollbarPluginOptions);
};
-const validateRollbar = (environmentName, rollbarPlugin) => {
+const validateRollbarPresence = (environmentName, rollbarPlugin) => {
const requiresRollbar = environmentName === 'dogfood' || environmentName === 'staging';
if (!requiresRollbar) {
@@ -79,11 +79,9 @@ const validateRollbar = (environmentName, rollbarPlugin) => {
}
if (!rollbarPlugin) {
- if (environmentName === 'dogfood' || environmentName === 'staging') {
- throw new Error(
- `Please set rollbar env var ${ROLLBAR_PUBLISH_TOKEN_ENV_NAME} to a Rollbar project access token with post_server_item permissions to deploy source maps to ${environmentName}`,
- );
- }
+ throw new Error(
+ `Please set rollbar env var ${ROLLBAR_PUBLISH_TOKEN_ENV_NAME} to a Rollbar project access token with post_server_item permissions to deploy source maps to ${environmentName}`,
+ );
}
};
@@ -111,7 +109,7 @@ module.exports = (env, argv) => {
} else {
console.log('Not using rollbar plugin');
}
- validateRollbar(environmentName, rollbarPlugin);
+ validateRollbarPresence(environmentName, rollbarPlugin);
const config = {
entry: {