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;
|
||||
|
||||
|
|
|
@ -3,21 +3,20 @@ import adapter from '@sveltejs/adapter-static';
|
|||
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||
// for more information about preprocessors
|
||||
preprocess: vitePreprocess(),
|
||||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||
// for more information about preprocessors
|
||||
preprocess: vitePreprocess(),
|
||||
|
||||
vitePlugin: {
|
||||
inspector: true,
|
||||
},
|
||||
kit: {
|
||||
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
||||
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
||||
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
||||
adapter: adapter({
|
||||
fallback: 'index.html'
|
||||
}),
|
||||
files: { lib: './src/lib/' }
|
||||
}
|
||||
vitePlugin: {
|
||||
inspector: true,
|
||||
},
|
||||
kit: {
|
||||
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
||||
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
||||
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
||||
adapter: adapter({
|
||||
fallback: 'index.html'
|
||||
})
|
||||
}
|
||||
};
|
||||
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