Skip to content

Commit

Permalink
fix: two-slash build error
Browse files Browse the repository at this point in the history
  • Loading branch information
clark-cui committed Jan 10, 2024
1 parent b699750 commit beb1fb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ async function config() {
md.use(mathjax3);
},
},
vite: {
ssr: {
noExternal: ["vitepress-plugin-twoslash"],
},
},
};
}
export default config();
2 changes: 1 addition & 1 deletion posts/two-slash测试.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ VitePress provides [a few options for customizing Shikiji](https://github.com/vu

### TwoSlash

To enable [TypeScript TwoSlash](/packages/twoslash) (type hover on code snippets) in VitePress, we provide a VitePress plugin for easy setup. Pre-styled, with [Floating Vue](https://floating-vue.starpad.dev/) to display the type information out side of the code container.
To enable TypeScript TwoSlash(type hover on code snippets) in VitePress, we provide a VitePress plugin for easy setup. Pre-styled, with [Floating Vue](https://floating-vue.starpad.dev/) to display the type information out side of the code container.

```bash
npm i -D vitepress-plugin-twoslash
Expand Down

0 comments on commit beb1fb6

Please sign in to comment.