-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Add support for Svelte 4 (#297)
- Loading branch information
Showing
11 changed files
with
52 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
/// <reference types="@sveltejs/kit" /> | ||
/// <reference types="unplugin-icons/types/svelte" /> | ||
import 'unplugin-icons/types/svelte'; | ||
|
||
declare global { | ||
namespace App { | ||
// interface Error {} | ||
// interface Locals {} | ||
// interface PageData {} | ||
// interface Platform {} | ||
} | ||
} | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import preprocess from 'svelte-preprocess' | ||
import { vitePreprocess } from '@sveltejs/kit/vite' | ||
|
||
/** @type {import('@sveltejs/kit').Config} */ | ||
const config = { | ||
// Consult https://github.com/sveltejs/svelte-preprocess | ||
// for more information about preprocessors | ||
preprocess: preprocess(), | ||
preprocess: vitePreprocess(), | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import App from './App.svelte' | ||
|
||
const app = new App({ | ||
target: document.getElementById('app'), | ||
target: document.getElementById('app')!, | ||
}) | ||
|
||
export default app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
declare module 'virtual:icons/*' { | ||
export { SvelteComponentDev as default } from 'svelte/internal' | ||
} | ||
|
||
declare module '~icons/*' { | ||
import { SvelteComponentTyped } from 'svelte' | ||
export default class extends SvelteComponentTyped<svelte.JSX.IntrinsicElements['svg']> {} | ||
} | ||
import './svelte4.d.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
declare module 'virtual:icons/*' { | ||
export { SvelteComponentDev as default } from 'svelte/internal' | ||
} | ||
|
||
declare module '~icons/*' { | ||
import { SvelteComponentTyped } from 'svelte' | ||
export default class extends SvelteComponentTyped<svelte.JSX.IntrinsicElements['svg']> {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
declare module 'virtual:icons/*' { | ||
import { SvelteComponent } from 'svelte' | ||
import type { SvelteHTMLElements } from 'svelte/elements' | ||
export default class extends SvelteComponent<SvelteHTMLElements['svg']> {} | ||
} | ||
|
||
declare module '~icons/*' { | ||
import { SvelteComponent } from 'svelte' | ||
import type { SvelteHTMLElements } from 'svelte/elements' | ||
export default class extends SvelteComponent<SvelteHTMLElements['svg']> {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
import './vue3' | ||
import './vue3.d.ts' |