fix: Use $lib aliases
This commit is contained in:
parent
ac93c0ca4b
commit
4fc96f4d40
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { type TypeMessage } from '../';
|
import { type TypeMessage } from '$lib';
|
||||||
const { message, imageSrc, user }: TypeMessage = $props();
|
const { message, imageSrc, user }: TypeMessage = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import { Server as SocketIOServer } from 'socket.io';
|
import { Server as SocketIOServer } from 'socket.io';
|
||||||
import type { HttpServer } from 'vite';
|
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 { client, createChannel, storeMessage } from './server/db/';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import '../app.css';
|
import '$lib/app.css';
|
||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import type { PageLoad } from './$types';
|
import type { PageLoad } from './$types';
|
||||||
import type { TypeMessage } from '$lib';
|
import type { TypeMessage } from '$lib';
|
||||||
import { getMessages, client } from '../lib/server/db';
|
import { getMessages, client } from '$/lib/server/db';
|
||||||
|
|
||||||
export const load: PageLoad = async () => {
|
export const load: PageLoad = async () => {
|
||||||
const rows = await getMessages(client, '000', 5);
|
const rows = await getMessages(client, '000', 5);
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
import { io } from 'socket.io-client';
|
import { io } from 'socket.io-client';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import Message from '../lib/components/message.svelte';
|
import Message from '$lib/components/message.svelte';
|
||||||
import SendIcon from '../lib/icons/SendIcon.svelte';
|
import SendIcon from '$lib/icons/SendIcon.svelte';
|
||||||
import { type TypeMessage } from '../lib';
|
import { type TypeMessage } from '$lib';
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
|
|
||||||
let { data }: { data: PageData } = $props();
|
let { data }: { data: PageData } = $props();
|
||||||
|
Loading…
Reference in New Issue
Block a user