Skip to content

Commit 2cc4133

Browse files
committed
Refactor nextra initialization to support both default and named exports, remove package-lock.yaml and pnpm-lock.yaml for cleaner dependency management
1 parent ca120aa commit 2cc4133

4 files changed

Lines changed: 8 additions & 7979 deletions

File tree

next.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
const withNextra = require('nextra')({
1+
const nextraModule = require('nextra')
2+
// Handle both default export and named export cases
3+
const nextra = typeof nextraModule === 'function'
4+
? nextraModule
5+
: (nextraModule.default || nextraModule)
6+
7+
const withNextra = nextra({
28
theme: 'nextra-theme-docs',
39
themeConfig: './theme.config.tsx'
410
})

0 commit comments

Comments
 (0)