svelte-highlight 5.3.1 → 5.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +2 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [5.3.2](https://github.com/metonym/svelte-highlight/releases/tag/v5.3.2) - 2022-03-16
|
|
9
|
+
|
|
10
|
+
- specify in docs that vite should optimize both "highlight.js" and "highlight.js/lib/core" if using SvelteKit or vite
|
|
11
|
+
|
|
8
12
|
## [5.3.1](https://github.com/metonym/svelte-highlight/releases/tag/v5.3.1) - 2022-03-16
|
|
9
13
|
|
|
10
14
|
- use default highlight.js library for `HighlightAuto`
|
package/README.md
CHANGED
|
@@ -31,16 +31,15 @@ pnpm i -D svelte-highlight highlight.js
|
|
|
31
31
|
|
|
32
32
|
## SvelteKit Set-up
|
|
33
33
|
|
|
34
|
-
To use this library with SvelteKit, instruct vite to optimize `highlight.js
|
|
34
|
+
To use this library with [SvelteKit](https://github.com/sveltejs/kit) or [vite](https://github.com/sveltejs/vite-plugin-svelte), instruct vite to optimize `highlight.js` and `highlight.js/lib/core`:
|
|
35
35
|
|
|
36
36
|
```diff
|
|
37
37
|
# svelte.config.js
|
|
38
38
|
export default {
|
|
39
39
|
kit: {
|
|
40
|
-
target: "#svelte",
|
|
41
40
|
+ vite: {
|
|
42
41
|
+ optimizeDeps: {
|
|
43
|
-
+ include: ["highlight.js/lib/core"],
|
|
42
|
+
+ include: ["highlight.js", "highlight.js/lib/core"],
|
|
44
43
|
+ },
|
|
45
44
|
+ },
|
|
46
45
|
},
|