Cấu hình Vite
Môi trường: node
Slidev được cung cấp bởi Vite. Điều này có nghĩa là bạn có thể tận dụng hệ thống plugin tuyệt vời của Vite để tùy chỉnh các trang trình bày của mình hơn nữa.
Nếu có file vite.config.js
trong dự án, nó sẽ được đọc.
Slidev có các plugin sau được cấu hình sẵn:
- @vitejs/plugin-vue
- vite-plugin-md
- vite-plugin-components
- vite-plugin-windicss
- vite-plugin-icons
- vite-plugin-remote-assets
Invalid code snippet option
Cấu hình trước đó.
Tìm hiểu thêm vềLearn more about the pre-configurations here.
Configure Internal Plugins
Available since v0.21
To configure the built-in plugins list above, create vite.config.ts
with the following content. Please note Slidev has some preconfigure options for those plugins, this usage will override some of them, which could potentially cause the app to break. Please treat this as an advanced feature, make sure you know what you are doing before moving on.
import { defineConfig } from 'vite'
export default defineConfig({
slidev: {
vue: {
/* vue options */
},
markdown: {
/* markdown-it options */
markdownItSetup(md) {
/* custom markdown-it plugins */
md.use(/* ... */)
},
},
/* options for other plugins */
},
})
See the type declarations for more options.
33596b32fd16d21d346827c2a02957f6a062f0e3