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