replace hardcoded url

This commit is contained in:
danztran
2020-07-01 18:55:01 +07:00
parent ea58f885e2
commit c371e45067
2 changed files with 14 additions and 11 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ import { BundlingOptions, BackendBundlingOptions } from './types';
export function resolveBaseUrl(config: Config): URL {
const baseUrl = config.getString('app.baseUrl');
try {
return new URL(baseUrl, 'http://localhost:3000');
return new URL(baseUrl);
} catch (error) {
throw new Error(`Invalid app.baseUrl, ${error}`);
}
@@ -49,7 +49,7 @@ export function createConfig(
const { plugins, loaders } = transforms(options);
const baseUrl = options.config.getString('app.baseUrl');
const validBaseUrl = new URL(baseUrl, 'https://backstage-app.dev');
const validBaseUrl = new URL(baseUrl);
if (checksEnabled) {
plugins.push(