Description
Vue SFC imports that use a TypeScript path alias are not resolved to workspace files, so CodeGraphy does not create a Relationship between the corresponding File Nodes.
Relative imports work correctly.
Reproduction
Given this tsconfig.json:
{
"compilerOptions": {
"moduleResolution": "bundler",
"paths": {
"@/*": ["./src/*"]
}
}
}
And the following files:
src/
├── components/MeasureTool.vue
└── stores/useMeasureStore.ts
MeasureTool.vue imports the store using the configured alias:
<script setup lang="ts">
import { useMeasureStore } from '@/stores/useMeasureStore';
const measureStore = useMeasureStore();
</script>
Steps:
- Open the workspace in VS Code.
- Index the workspace with CodeGraphy.
- Open the Relationship Graph.
- Inspect the File Nodes for
MeasureTool.vue and useMeasureStore.ts.
Actual behavior
No Relationship is created between:
src/components/MeasureTool.vue
src/stores/useMeasureStore.ts
However, a relative import such as:
import { createKMZHandlers } from './MapIO';
creates the expected Relationship.
Expected behavior
CodeGraphy should read the nearest tsconfig.json or jsconfig.json, resolve the configured compilerOptions.paths, and create the appropriate import and call Relationships.
External package imports such as vue or pinia should continue to be treated as external packages rather than workspace files.
Environment
- CodeGraphy: 5.16.4
- OS: Windows
- Project type: Vue 3 + TypeScript + Vite
Acceptance criteria
- Vue SFC imports using
@/* path mappings resolve to the correct workspace File Node.
- JavaScript and TypeScript imports use the same path-mapping behavior.
- Static imports, dynamic imports, reexports, and imported calls receive the resolved path.
- Windows paths are normalized so resolved paths match indexed File Nodes.
- Relative import behavior remains unchanged.
- Bare external package imports do not resolve to workspace File Nodes.
Description
Vue SFC imports that use a TypeScript path alias are not resolved to workspace files, so CodeGraphy does not create a Relationship between the corresponding File Nodes.
Relative imports work correctly.
Reproduction
Given this
tsconfig.json:{ "compilerOptions": { "moduleResolution": "bundler", "paths": { "@/*": ["./src/*"] } } }And the following files:
MeasureTool.vueimports the store using the configured alias:Steps:
MeasureTool.vueanduseMeasureStore.ts.Actual behavior
No Relationship is created between:
However, a relative import such as:
creates the expected Relationship.
Expected behavior
CodeGraphy should read the nearest
tsconfig.jsonorjsconfig.json, resolve the configuredcompilerOptions.paths, and create the appropriate import and call Relationships.External package imports such as
vueorpiniashould continue to be treated as external packages rather than workspace files.Environment
Acceptance criteria
@/*path mappings resolve to the correct workspace File Node.