Co-authored-by: Vincenzo Scamporlino <vinzscam@users.noreply.github.com>
Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
Philipp Hugenroth
2023-07-18 16:54:54 +02:00
committed by Patrik Oldsberg
parent 1d527ae2b6
commit 4f14cae16e
+5 -5
View File
@@ -45,7 +45,7 @@ export async function serveBundle(options: ServeOptions) {
const packageDetectionMode = options.fullConfig.getOptional(
'app.experimental.packages',
);
const extraPackages = [];
const extraPackages: string[] = [];
if (packageDetectionMode === 'all') {
for (const depName of Object.keys(pkg.dependencies ?? {})) {
const depPackageJson: BackstagePackageJson = require(require.resolve(
@@ -61,9 +61,10 @@ export async function serveBundle(options: ServeOptions) {
}
}
} else {
const packagesList = Array.isArray(packageDetectionMode)
? packageDetectionMode
: [];
const packagesList = options.fullConfig.getStringArray(
'app.experimental.packages',
);
for (const depName of packagesList ?? []) {
const depPackageJson: BackstagePackageJson = require(require.resolve(
`${depName}/package.json`,
@@ -203,7 +204,6 @@ export async function serveBundle(options: ServeOptions) {
: false,
host,
port,
proxy: pkg.proxy,
// When the dev server is behind a proxy, the host and public hostname differ
allowedHosts: [url.hostname],
client: {