diff --git a/backend/src/main.ts b/backend/src/main.ts
index d05b809..e2d0572 100644
--- a/backend/src/main.ts
+++ b/backend/src/main.ts
@@ -48,7 +48,9 @@ async function bootstrap() {
await createAdminUser(app.get(UsersService));
await app.listen(9494);
- console.log(`Application is running on: ${await app.getUrl()} in ${NODE_ENV} mode`);
+ console.log(
+ `Application is running on: ${await app.getUrl()} in ${NODE_ENV} mode`,
+ );
}
bootstrap();
diff --git a/src/TestElement.svelte b/src/TestElement.svelte
index 51c65de..8acff66 100644
--- a/src/TestElement.svelte
+++ b/src/TestElement.svelte
@@ -1,6 +1,6 @@
diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte
index 1f7eb1f..93454a9 100644
--- a/src/lib/components/Button.svelte
+++ b/src/lib/components/Button.svelte
@@ -1,5 +1,5 @@
diff --git a/src/lib/components/Carousel/UICarousel.svelte b/src/lib/components/Carousel/UICarousel.svelte
index f9b5f8c..e1789dc 100644
--- a/src/lib/components/Carousel/UICarousel.svelte
+++ b/src/lib/components/Carousel/UICarousel.svelte
@@ -1,7 +1,7 @@
diff --git a/src/lib/components/Ghosts/ButtonGhost.svelte b/src/lib/components/Ghosts/ButtonGhost.svelte
index 4fff89a..a5bfa4e 100644
--- a/src/lib/components/Ghosts/ButtonGhost.svelte
+++ b/src/lib/components/Ghosts/ButtonGhost.svelte
@@ -1,5 +1,5 @@
- import Container from '../../../Container.svelte';
+ import Container from '../Container.svelte';
import HeroShowcaseBackground from './HeroBackground.svelte';
import IconButton from '../IconButton.svelte';
import { ChevronRight } from 'radix-icons-svelte';
diff --git a/src/lib/components/IconToggle.svelte b/src/lib/components/IconToggle.svelte
index f8d8c41..e936b52 100644
--- a/src/lib/components/IconToggle.svelte
+++ b/src/lib/components/IconToggle.svelte
@@ -1,5 +1,5 @@
diff --git a/src/lib/components/MediaManager/modals/FileActionsModal.svelte b/src/lib/components/MediaManager/modals/FileActionsModal.svelte
index 7af66ed..63205d1 100644
--- a/src/lib/components/MediaManager/modals/FileActionsModal.svelte
+++ b/src/lib/components/MediaManager/modals/FileActionsModal.svelte
@@ -1,5 +1,5 @@
diff --git a/src/lib/components/PersonCard/PersonCard.svelte b/src/lib/components/PersonCard/PersonCard.svelte
index b173cf5..35a12a1 100644
--- a/src/lib/components/PersonCard/PersonCard.svelte
+++ b/src/lib/components/PersonCard/PersonCard.svelte
@@ -1,6 +1,6 @@
diff --git a/src/lib/components/Table/TableButton.svelte b/src/lib/components/Table/TableButton.svelte
index 4bc85e3..b5e70f0 100644
--- a/src/lib/components/Table/TableButton.svelte
+++ b/src/lib/components/Table/TableButton.svelte
@@ -1,5 +1,5 @@
- import Container from '../../../Container.svelte';
+ import Container from '../Container.svelte';
import classNames from 'classnames';
import { ChevronDown, ChevronUp } from 'radix-icons-svelte';
import type { Readable } from 'svelte/store';
diff --git a/src/lib/components/Table/TableRow.svelte b/src/lib/components/Table/TableRow.svelte
index 81a0d22..99bd5f9 100644
--- a/src/lib/components/Table/TableRow.svelte
+++ b/src/lib/components/Table/TableRow.svelte
@@ -1,5 +1,5 @@
diff --git a/src/lib/components/VideoPlayer/JellyfinVideoPlayerModal.svelte b/src/lib/components/VideoPlayer/JellyfinVideoPlayerModal.svelte
index bcacaf2..038bbaa 100644
--- a/src/lib/components/VideoPlayer/JellyfinVideoPlayerModal.svelte
+++ b/src/lib/components/VideoPlayer/JellyfinVideoPlayerModal.svelte
@@ -1,6 +1,6 @@
diff --git a/src/lib/pages/UsersPage.svelte b/src/lib/pages/UsersPage.svelte
index 8852a76..08014f3 100644
--- a/src/lib/pages/UsersPage.svelte
+++ b/src/lib/pages/UsersPage.svelte
@@ -2,7 +2,7 @@
import DetachedPage from '../components/DetachedPage/DetachedPage.svelte';
import { type Session, sessions } from '../stores/session.store.js';
import { reiverrApi } from '../apis/reiverr/reiverr-api';
- import Container from '../../Container.svelte';
+ import Container from '$components/Container.svelte';
import Button from '../components/Button.svelte';
import classNames from 'classnames';
import { navigate } from '../components/StackRouter/StackRouter';
diff --git a/tsconfig.json b/tsconfig.json
index 8c46bc4..bfcc631 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -14,11 +14,13 @@
"allowJs": true,
"checkJs": true,
"isolatedModules": true,
- "noUncheckedIndexedAccess": true
- // "paths": {
- // "$lib/*": ["src/lib/*"],
- // }
+ "noUncheckedIndexedAccess": true,
+ "baseUrl": "./src",
+ "paths": {
+ "$lib/*": ["lib/*"],
+ "$components/*": ["lib/components/*"],
+ "$pages/*": ["lib/pages/*"]
+ }
},
- "include": ["src/**/*.ts", "src/**/*.js", "src/**/*.svelte"],
- "references": [{ "path": "./tsconfig.node.json" }]
+ "include": ["src/**/*.ts", "src/**/*.js", "src/**/*.svelte"]
}
diff --git a/vite.config.ts b/vite.config.ts
index 898b1af..b5532d7 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -4,6 +4,7 @@ import { viteSingleFile } from 'vite-plugin-singlefile';
import viteLegacyPlugin from '@vitejs/plugin-legacy';
import { readFileSync } from 'fs';
import { fileURLToPath } from 'url';
+import path from 'path';
const file = fileURLToPath(new URL('package.json', import.meta.url));
const json = readFileSync(file, 'utf8');
@@ -25,6 +26,13 @@ export default defineConfig({
optimizeDeps: { exclude: ['svelte-navigator'] },
define: {
REIVERR_VERSION: `"${pkg.version}"`
+ },
+ resolve: {
+ alias: {
+ $lib: path.resolve(__dirname, './src/lib'),
+ $components: path.resolve(__dirname, './src/lib/components'),
+ $pages: path.resolve(__dirname, './src/lib/pages')
+ }
}
// base: '/dist',