Use invalidateAll and change some svelte/vite/ts configuration file
This commit is contained in:
parent
091429be58
commit
3c7413b799
4 changed files with 23 additions and 24 deletions
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts">
|
||||
import QuizCard from "$lib/components/QuizCard.svelte"
|
||||
import { EventsOn, LogDebug } from "$lib/wailsjs/runtime/runtime"
|
||||
import { invalidateAll } from "$app/navigation";
|
||||
import { tick } from 'svelte';
|
||||
import { invalidateAll } from "$app/navigation"
|
||||
import { tick } from 'svelte'
|
||||
import { client } from "$lib/wailsjs/go/models"
|
||||
import { QuizFromMarkdown, CreateQuiz } from "$lib/wailsjs/go/main/App"
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
|||
}
|
||||
})
|
||||
|
||||
async function handleKeyDown(event) {
|
||||
async function handleKeyDown(event: any) {
|
||||
if (event.key === 'Escape') {
|
||||
creatingNewQuiz = false;
|
||||
|
||||
|
|
|
@ -16,8 +16,7 @@ const config = {
|
|||
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
||||
adapter: adapter({
|
||||
fallback: 'index.html'
|
||||
}),
|
||||
files: { lib: './src/lib/' }
|
||||
})
|
||||
}
|
||||
};
|
||||
export default config;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"$lib/*": ["./src/lib/*"],
|
||||
|
||||
// Adds the ability to import from the `frontend/` folder.
|
||||
"@/*": ["./*"]
|
||||
// "@/*": ["./*"]
|
||||
}
|
||||
}
|
||||
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import path from 'path'
|
||||
// import path from 'path'
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
fs: {
|
||||
// Allow serving files from the frontend project root
|
||||
allow: ['.'],
|
||||
// allow: ['.'],
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
|
@ -14,7 +14,7 @@ export default defineConfig({
|
|||
// This alias finishes the ability to reference our
|
||||
// frontend/ with `@path/to/file`.
|
||||
//
|
||||
'@': path.resolve(__dirname, './'),
|
||||
// '@': path.resolve(__dirname, './'),
|
||||
},
|
||||
},
|
||||
plugins: [sveltekit()],
|
||||
|
|
Loading…
Reference in a new issue