fix(core): repair sourcemap creation in createNodes (#22851)
This commit is contained in:
parent
801a22b243
commit
e05cb4f689
@ -11,7 +11,7 @@ export function selectSourceInfo(
|
||||
// When the key is a prefix of the filter, we can record it as the root source.
|
||||
// Use the most specific key for the root "." source value.
|
||||
// e.g. `targets.build` takes precedence over `targets`
|
||||
if (!rootKey || key.startsWith(rootKey)) {
|
||||
if (!rootKey || key?.startsWith(rootKey)) {
|
||||
rootKey = key;
|
||||
rootSource = value;
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ export function SourcemapInfoToolTip({
|
||||
// Every other property within in the target has the form `target.${targetName}.${propertyName}
|
||||
const isTarget = propertyKey.split('.').length === 2;
|
||||
|
||||
const docsUrlSlug: string | undefined = plugin.startsWith('@nx/')
|
||||
const docsUrlSlug: string | undefined = plugin?.startsWith('@nx/')
|
||||
? plugin.replace('@nx/', '').split('/')[0]
|
||||
: undefined;
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ export async function runCreateNodesInParallel(
|
||||
// Existing behavior is to ignore null results of
|
||||
// createNodes function.
|
||||
if (r) {
|
||||
results.push(r);
|
||||
results.push({ ...r, file, pluginName: plugin.name });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user