Skip to content

Commit f1292d6

Browse files
committed
Undid the last commit
1 parent 7202a72 commit f1292d6

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

demo/docusaurus.config.js

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -267,25 +267,12 @@ const config = {
267267
};
268268

269269
async function createConfig() {
270-
try {
271-
const lightTheme = (await import("./src/utils/prismLight.mjs")).default;
272-
const darkTheme = (await import("./src/utils/prismDark.mjs")).default;
273-
// @ts-expect-error: we know it exists, right
274-
config.themeConfig.prism.theme = lightTheme;
275-
// @ts-expect-error: we know it exists, right
276-
config.themeConfig.prism.darkTheme = darkTheme;
277-
} catch (error) {
278-
console.warn(
279-
"Failed to load custom prism themes, using defaults:",
280-
error.message
281-
);
282-
// Fallback to default themes from prism-react-renderer
283-
const { themes } = await import("prism-react-renderer");
284-
// @ts-expect-error: we know it exists, right
285-
config.themeConfig.prism.theme = themes.github;
286-
// @ts-expect-error: we know it exists, right
287-
config.themeConfig.prism.darkTheme = themes.vsDark;
288-
}
270+
const lightTheme = (await import("./src/utils/prismLight.mjs")).default;
271+
const darkTheme = (await import("./src/utils/prismDark.mjs")).default;
272+
// @ts-expect-error: we know it exists, right
273+
config.themeConfig.prism.theme = lightTheme;
274+
// @ts-expect-error: we know it exists, right
275+
config.themeConfig.prism.darkTheme = darkTheme;
289276
return config;
290277
}
291278

0 commit comments

Comments
 (0)