Skip to content

Conversation

luisbytes
Copy link
Contributor

Fix #1873

In the Angular standalone starter, the auto import feature in VS Code was not working for Ionic components.

This was caused by the .vscode/settings.json configuration, which excluded "@ionic/angular" entirely from typescript.preferences.autoImportFileExcludePatterns.

That exclusion prevented VS Code from suggesting imports not only from the barrel file (@ionic/angular), but also from subpaths such as:

import { IonButton } from '@ionic/angular/standalone';

What’s changed

Instead of excluding the entire @ionic/angular package, this PR refines the exclusion list after reviewing the barrel file to identify which internal paths are actually re-exported.
As a result, only those specific internal paths are excluded:

"typescript.preferences.autoImportFileExcludePatterns": [
  "@ionic/angular/common",
  "@ionic/angular/directives",
  "@ionic/angular/index.d.ts",
  "@ionic/angular/providers"
]

Result

Auto import in VS Code now correctly works for:

import { IonButton } from '@ionic/angular/standalone';

while still preventing imports from the internal subpaths of @ionic/angular.

@luisbytes luisbytes requested a review from a team as a code owner October 12, 2025 17:10
@luisbytes luisbytes requested review from gnbm and removed request for a team October 12, 2025 17:10
@luisbytes luisbytes changed the title fix(angular-standalone): enable auto import for /angular-standalone fix(angular-standalone): enable auto import for angular standalone Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto import not working in Angular standalone

1 participant