SkyeYoung commented on code in PR #2583:
URL: https://github.com/apache/apisix-dashboard/pull/2583#discussion_r943088629
##########
web/config/defaultSettings.ts:
##########
@@ -42,3 +43,20 @@ export default {
test: string;
};
};
+
+const { dev, test } = defaultSettings.serveUrlMap;
+const throwPromptError = (message: TemplateStringsArray) => {
+ throw new Error(
+ `Please set '${message[0]}' in 'web/.env' file. Guide:
https://apisix.apache.org/docs/dashboard/develop/#web`,
+ );
+};
+
+if (REACT_APP_ENV === 'test' && !test) {
+ throwPromptError`SERVER_URL_TEST`;
Review Comment:
Although we don't seem to have used it much in this project yet, it is
actually relatively common, for example in emotion, styled components,
graphql...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]