Skip to content

Commit 4501b5a

Browse files
authored
chore(deps): update @shikijs/vitepress-twoslash to 1.5.0 (#16637)
1 parent 22dc196 commit 4501b5a

File tree

4 files changed

+31
-55
lines changed

4 files changed

+31
-55
lines changed

docs/config/build-options.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ type ResolveModulePreloadDependenciesFn = (
4848
4949
The `resolveDependencies` function will be called for each dynamic import with a list of the chunks it depends on, and it will also be called for each chunk imported in entry HTML files. A new dependencies array can be returned with these filtered or more dependencies injected, and their paths modified. The `deps` paths are relative to the `build.outDir`. Returning a relative path to the `hostId` for `hostType === 'js'` is allowed, in which case `new URL(dep, import.meta.url)` is used to get an absolute path when injecting this module preload in the HTML head.
5050
51-
<!-- prettier-ignore-start -->
5251
```js twoslash
5352
/** @type {import('vite').UserConfig} */
5453
const config = {
54+
// prettier-ignore
5555
build: {
5656
// ---cut-before---
5757
modulePreload: {
@@ -63,7 +63,6 @@ modulePreload: {
6363
},
6464
}
6565
```
66-
<!-- prettier-ignore-end -->
6766

6867
The resolved dependency paths can be further modified using [`experimental.renderBuiltUrl`](../guide/build.md#advanced-base-options).
6968

docs/guide/build.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ A user may choose to deploy in three different paths:
238238

239239
A single static [base](#public-base-path) isn't enough in these scenarios. Vite provides experimental support for advanced base options during build, using `experimental.renderBuiltUrl`.
240240

241-
<!-- prettier-ignore-start -->
242241
```ts twoslash
243242
import type { UserConfig } from 'vite'
243+
// prettier-ignore
244244
const config: UserConfig = {
245245
// ---cut-before---
246246
experimental: {
@@ -255,14 +255,13 @@ experimental: {
255255
// ---cut-after---
256256
}
257257
```
258-
<!-- prettier-ignore-end -->
259258

260259
If the hashed assets and public files aren't deployed together, options for each group can be defined independently using asset `type` included in the second `context` param given to the function.
261260

262-
<!-- prettier-ignore-start -->
263261
```ts twoslash
264262
import type { UserConfig } from 'vite'
265263
import path from 'node:path'
264+
// prettier-ignore
266265
const config: UserConfig = {
267266
// ---cut-before---
268267
experimental: {
@@ -279,6 +278,5 @@ experimental: {
279278
// ---cut-after---
280279
}
281280
```
282-
<!-- prettier-ignore-end -->
283281

284282
Note that the `filename` passed is a decoded URL, and if the function returns a URL string, it should also be decoded. Vite will handle the encoding automatically when rendering the URLs. If an object with `runtime` is returned, encoding should be handled yourself where needed as the runtime code will be rendered as is.

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"docs-serve": "vitepress serve"
99
},
1010
"devDependencies": {
11-
"@shikijs/vitepress-twoslash": "^1.4.0",
11+
"@shikijs/vitepress-twoslash": "^1.5.0",
1212
"@types/express": "^4.17.21",
1313
"vitepress": "1.1.4",
1414
"vue": "^3.4.27"

pnpm-lock.yaml

Lines changed: 27 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)