fix: Use $lib aliases

This commit is contained in:
April Hall 2025-01-12 01:01:38 -05:00
parent ac93c0ca4b
commit 4fc96f4d40
Signed by: arithefirst
GPG Key ID: 4508A15C4DB91C5B
5 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { type TypeMessage } from '../';
import { type TypeMessage } from '$lib';
const { message, imageSrc, user }: TypeMessage = $props();
</script>

View File

@ -1,5 +1,7 @@
import { Server as SocketIOServer } from 'socket.io';
import type { HttpServer } from 'vite';
// Don't try to replace with $lib alias. Since this
// file gets loaded as a vite plugin, it will crash
import { client, createChannel, storeMessage } from './server/db/';
import { v4 as uuidv4 } from 'uuid';

View File

@ -1,5 +1,5 @@
<script lang="ts">
import '../app.css';
import '$lib/app.css';
let { children } = $props();
</script>

View File

@ -1,6 +1,6 @@
import type { PageLoad } from './$types';
import type { TypeMessage } from '$lib';
import { getMessages, client } from '../lib/server/db';
import { getMessages, client } from '$/lib/server/db';
export const load: PageLoad = async () => {
const rows = await getMessages(client, '000', 5);

View File

@ -2,9 +2,9 @@
import { io } from 'socket.io-client';
import { onMount } from 'svelte';
import { v4 as uuidv4 } from 'uuid';
import Message from '../lib/components/message.svelte';
import SendIcon from '../lib/icons/SendIcon.svelte';
import { type TypeMessage } from '../lib';
import Message from '$lib/components/message.svelte';
import SendIcon from '$lib/icons/SendIcon.svelte';
import { type TypeMessage } from '$lib';
import type { PageData } from './$types';
let { data }: { data: PageData } = $props();