Skip to content

Commit 825399a

Browse files
committed
chore(examples): rename vite --> vite@svelte-4
1 parent 92a6443 commit 825399a

16 files changed

+16
-13
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -511,10 +511,13 @@ In the example below, the `HighlightAuto` component and injected styles are dyna
511511

512512
## Examples
513513

514+
By default, example set-ups use Svelte 5. The exception is `examples/vite@svelte-4`, which uses Svelte 4.
515+
514516
- [examples/rollup](examples/rollup)
515517
- [examples/routify](examples/routify)
516518
- [examples/sveltekit](examples/sveltekit)
517519
- [examples/vite](examples/vite)
520+
- [examples/vite@svelte-4](examples/vite@svelte-4)
518521
- [examples/webpack](examples/webpack)
519522

520523
## [Changelog](CHANGELOG.md)

examples/vite/bun.lockb

-10.1 KB
Binary file not shown.

examples/vite/index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
</head>
77
<body>
88
<script type="module">
9+
import { mount } from "svelte";
910
import App from "./src/App.svelte";
1011

11-
const app = new App({ target: document.body });
12+
mount(App, { target: document.body });
1213
</script>
1314
</body>
1415
</html>

examples/vite/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"preview": "vite preview"
88
},
99
"devDependencies": {
10-
"@sveltejs/vite-plugin-svelte": "^3.1.2",
10+
"@sveltejs/vite-plugin-svelte": "latest",
1111
"@tsconfig/svelte": "latest",
12-
"svelte": "^4.2.19",
12+
"svelte": "latest",
1313
"svelte-highlight": "latest",
1414
"typescript": "latest",
15-
"vite": "^5.4.11"
15+
"vite": "latest"
1616
}
1717
}

examples/vite/vite.config.ts

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import { svelte, vitePreprocess } from "@sveltejs/vite-plugin-svelte";
22
import type { UserConfig } from "vite";
33

44
export default {
5+
resolve: {
6+
conditions: ["browser"],
7+
},
58
plugins: [
69
svelte({
710
preprocess: vitePreprocess(),
File renamed without changes.

examples/vite@svelte-5/README.md examples/vite@svelte-4/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# examples/vite@svelte-5
1+
# examples/vite@svelte-4
22

33
> `svelte-highlight` Vite set-up.
44

examples/vite@svelte-4/bun.lockb

42.6 KB
Binary file not shown.

examples/vite@svelte-5/index.html examples/vite@svelte-4/index.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
</head>
77
<body>
88
<script type="module">
9-
import { mount } from "svelte";
109
import App from "./src/App.svelte";
1110

12-
mount(App, { target: document.body });
11+
const app = new App({ target: document.body });
1312
</script>
1413
</body>
1514
</html>

examples/vite@svelte-5/package.json examples/vite@svelte-4/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"preview": "vite preview"
88
},
99
"devDependencies": {
10-
"@sveltejs/vite-plugin-svelte": "^4.0.3",
10+
"@sveltejs/vite-plugin-svelte": "^3.1.2",
1111
"@tsconfig/svelte": "latest",
12-
"svelte": "^5.14.0",
12+
"svelte": "^4.2.19",
1313
"svelte-highlight": "latest",
1414
"typescript": "latest",
15-
"vite": "latest"
15+
"vite": "^5.4.11"
1616
}
1717
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/vite@svelte-5/vite.config.ts examples/vite@svelte-4/vite.config.ts

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import { svelte, vitePreprocess } from "@sveltejs/vite-plugin-svelte";
22
import type { UserConfig } from "vite";
33

44
export default {
5-
resolve: {
6-
conditions: ["browser"],
7-
},
85
plugins: [
96
svelte({
107
preprocess: vitePreprocess(),

examples/vite@svelte-5/bun.lockb

-51.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)