@@ -267,25 +267,12 @@ const config = {
267267} ;
268268
269269async 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