Skip to content

Vue: tsconfig paths without baseUrl resolve against the importer, so aliased .vue imports always fall back #267

Closed

Description

@FredApps

In src/repo/graph.ts, .vue imports through tsconfig paths are resolved against baseUrl, or else against the importing file's directory. Without baseUrl, TypeScript resolves paths against the directory of the tsconfig that declares them (pathsBasePath). Every aliased .vue import in that layout is unresolved, so every change falls back to full validation.

Repro: tsconfig.json with "paths": { "@/*": ["./src/*"] } and no baseUrl. src/main.ts imports @/components/Hello.vue, and a test imports src/main.ts. Change src/components/Hello.vue. The same happens with the tsconfig in packages/app/.

Expected: the test is selected, as it is when baseUrl is set.

Actual: blocker "Unresolved Vue dependencies require full validation", analysis status UNSAFE, full fallback.

Not covered: the solution-style layout (root tsconfig.json with files: [] and the paths in a referenced tsconfig.app.json) still falls back. That stays safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions