Skip to content

Commit db12b81

Browse files
authored
feat: add relative imports for src, routes, and test (#228)
## Summary QOL change so we can use relative imports on the src, routes, and tests directory like we do for src now. ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Updated import paths to use absolute and alias-based imports across the frontend configuration - Enhanced module resolution in TypeScript configuration with new path aliases - Improved code maintainability by standardizing import structures <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 94df38d commit db12b81

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

frontend/src/lib/components/Observability/Observability.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
sortDistributions,
3535
type SortContext
3636
} from '$lib/util/sort';
37-
import type { JoinPageData } from '../../../routes/joins/[slug]/proxy+page.server';
37+
import type { JoinPageData } from '$routes/joins/[slug]/+page.server';
3838
3939
const api = new Api();
4040

frontend/svelte.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ const config = {
1111
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
1212
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
1313
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
14-
adapter: adapter()
14+
adapter: adapter(),
15+
alias: {
16+
$src: 'src',
17+
$routes: 'src/routes',
18+
$test: 'src/test'
19+
}
1520
},
1621
onwarn: (warning, handler) => {
1722
if (warning.filename.startsWith('node_modules/')) {

0 commit comments

Comments
 (0)