mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(compiler-cli): improve error message formatting (#45827)
Changes the message from: ``` The component 'HelloComponent' appears in 'imports', but is not standalone and cannot be imported directly It must be imported via an NgModule. ``` to ``` The component 'HelloComponent' appears in 'imports', but is not standalone and cannot be imported directly. It must be imported via an NgModule. ``` PR Close #45827
This commit is contained in:
@@ -31,7 +31,7 @@ export function makeNotStandaloneDiagnostic(
|
||||
|
||||
let message = `The ${kind} '${
|
||||
ref.node.name
|
||||
.text}' appears in 'imports', but is not standalone and cannot be imported directly`;
|
||||
.text}' appears in 'imports', but is not standalone and cannot be imported directly.`;
|
||||
let relatedInformation: ts.DiagnosticRelatedInformation[]|undefined = undefined;
|
||||
if (scope !== null && scope.kind === ComponentScopeKind.NgModule) {
|
||||
// The directive/pipe in question is declared in an NgModule. Check if it's also exported.
|
||||
|
||||
Reference in New Issue
Block a user