From 2aadb5b6ddc21898c1d58e879a5c885be0c5e430 Mon Sep 17 00:00:00 2001 From: Andriy Cherniy Date: Thu, 11 Aug 2022 14:22:10 +0300 Subject: [PATCH] fixed static assets --- frontend/src/app.css | 12 ++++++------ frontend/vite.config.js | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/frontend/src/app.css b/frontend/src/app.css index 4769dd2..adcaf8a 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -4,17 +4,17 @@ @font-face { font-family: 'Jeko-SemiBold'; - src: url('fonts/Jeko Semi Bold.ttf') + src: url('@fonts/Jeko Semi Bold.ttf') } @font-face { font-family: 'Jeko-MediumItalic'; - src: url('fonts/Jeko Medium Italic.ttf') + src: url('@fonts/Jeko Medium Italic.ttf') } @font-face { font-family: 'Jeko-Regular'; - src: url('fonts/Jeko Regular.ttf') + src: url('@fonts/Jeko Regular.ttf') } html { @@ -53,11 +53,11 @@ main { } #button1 { - background-image: url('projects.jpg'); + background-image: url('@projects.jpg'); } #button2 { - background-image: url('hosted.jpg'); + background-image: url('@hosted.jpg'); } .error { @@ -87,7 +87,7 @@ body { } .link { - background-image: url('link.svg'); + background-image: url('@link.svg'); background-position: center; background-repeat: no-repeat; background-size: 50%; diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 8747050..7a3a66d 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -1,7 +1,13 @@ import { sveltekit } from '@sveltejs/kit/vite'; +import path from 'path'; /** @type {import('vite').UserConfig} */ const config = { + resolve: { + alias: { + '@': path.resolve(__dirname, 'assets') + } + }, plugins: [sveltekit()] };