Skip to content

Commit

Permalink
Merge pull request #12 from pichfl/fix-deprecation
Browse files Browse the repository at this point in the history
Remove deprecation from import.meta.glob
  • Loading branch information
pichfl authored Jul 24, 2024
2 parents 00005e0 + 203ef43 commit 4454b03
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import Markdown from 'reveal.js/plugin/markdown/markdown.esm.js';
import Notes from 'reveal.js/plugin/notes/notes.esm.js';

import 'reveal.js/dist/reveal.css';

import '@theme';

const markdownFiles = import.meta.glob('slides/*.md', {
as: 'raw',
query: '?raw',
import: 'default',
eager: true,
});

Expand Down Expand Up @@ -48,12 +50,12 @@ const defaultConfig = {
let themeConfig = {};

try {
const findingConfig = import.meta.glob('@theme/config.json', {eager: true});
const findingConfig = import.meta.glob('@theme/config.json', { eager: true });
const [filename] = Object.keys(findingConfig);

if (filename) {
themeConfig = findingConfig[filename]
themeConfig = findingConfig[filename];
}
} catch {}

deck.initialize({...defaultConfig, ...themeConfig});
deck.initialize({ ...defaultConfig, ...themeConfig });

0 comments on commit 4454b03

Please sign in to comment.