Configure Vite
Environment: node
This setup function will only run on Node.js environment, you can have access to Node's API.
Kolibry is powered by Vite under the hood. This means you can leverage Vite's great plugin system to customize your slides even further.
The vite.config.ts
will be respected if you have one.
Kolibry has the following plugins preconfigured:
- @vitejs/plugin-vue
- unplugin-vue-components
- unplugin-icons
- vite-plugin-vue-markdown
- vite-plugin-remote-assets
- vite-plugin-windicss
- unocss/vite
Learn more about the pre-configurations here.
Configure Internal Plugins
To configure the built-in plugins list above, create vite.config.ts
with the following content. Please note Kolibry 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({
kolibry: {
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.