Skip to content

Auto import default exported component will break the imports #48689

@eneajaho

Description

@eneajaho

Which @angular/* package(s) are the source of the bug?

language-service

Is this a regression?

No

Description

When I try to auto import a component that is exported as default :

export default class TestComponent {}

the vscode plugin will import it as:

import { default } from "./test.component";

@Component({
    template: `
      <app-test />
    `,
    standalone: true,
    imports: [default]
})
export class AppComponent {}

This will make the build fail.

build error

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

P4A relatively minor issue that is not relevant to core functionsarea: language-serviceIssues related to Angular's VS Code language servicebugcross-cutting: standaloneIssues related to the NgModule-less worldstate: confirmed

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions