You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR: I want to be able to integrate slidev into existing vite projects, generating multiple slide decks with a simple vite build or vite dev. I have some ideas on how to do this.
I stared working on a vite plugin to run slidev during a vite dev/build in any existing codebase, in my case an astro-based website. I know that slidev already has an internal vite plugin, but it doesn't allow me to configure the build like I want it to. I want to be able to set the output path, control assets better, setup a glob pattern to find the files to export etc. It should then allow me to build my website with vite, but also generate the slides with the same vite process.
Due to the limited exports of @slidev/cli, this ended up being a bit tricky. This has several reasons, but the main issues are that slidev commands like build and exportSlides are not exported from the CLI package. You could export them from the direct path, like import { exportSlides } from "@slidev/cli/dist/export-D1Zqc-n1.js";, but I don't have to tell you that this is not a nice idea xD
I would love to either
include a new, public-facing vite plugin in this repo (like vite-plugin-slidev), or
extend the existing vite plugin so it can be configured as a standalone entrypoint for slidev, not as a way to configure the CLI
or, export more of the internal commands to allow such a plugin to be created by others (like me)
I already have a POC plugin working, so if this idea sounds right to you, I can open a example PR to include a plugin as a sub-package in this repo.
What do you think? Or, did I overlook some option to do what I want with the existing vite plugin?
Cheers!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!
I stared working on a vite plugin to run slidev during a vite dev/build in any existing codebase, in my case an astro-based website. I know that slidev already has an internal vite plugin, but it doesn't allow me to configure the build like I want it to. I want to be able to set the output path, control assets better, setup a glob pattern to find the files to export etc. It should then allow me to build my website with vite, but also generate the slides with the same vite process.
Due to the limited exports of
@slidev/cli
, this ended up being a bit tricky. This has several reasons, but the main issues are that slidev commands likebuild
andexportSlides
are not exported from the CLI package. You could export them from the direct path, likeimport { exportSlides } from "@slidev/cli/dist/export-D1Zqc-n1.js";
, but I don't have to tell you that this is not a nice idea xDI would love to either
vite-plugin-slidev
), orstandalone
entrypoint for slidev, not as a way to configure the CLII already have a POC plugin working, so if this idea sounds right to you, I can open a example PR to include a plugin as a sub-package in this repo.
What do you think? Or, did I overlook some option to do what I want with the existing vite plugin?
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions