calvinhnzr / pps-slides

Slides for PPS
https://glistening-bunny-020fcd.netlify.app/
0 stars 0 forks source link

[FEATURE] Migrate to Astro #2

Closed calvinhnzr closed 4 weeks ago

calvinhnzr commented 1 month ago

Motivation: Dynamic imports of Folder and Subfolders of mdx

calvinhnzr commented 4 weeks ago

First Migration Atempt failed. Not working like the bewished way:

calvinhnzr commented 4 weeks ago

Alternative Solution found: https://vite.dev/guide/features#glob-import

const modules = import.meta.glob("@/slides/*.mdx")

for (const path in modules) {
  modules[path]().then((module) => {
    // Verwende das importierte Modul
    console.log(module)
  })
}