Skip to content

Commit e9bc8b0

Browse files
committed
Refactor nextra initialization for improved compatibility
1 parent 936e175 commit e9bc8b0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

next.config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
const withNextra = require('nextra')({
1+
const nextraRaw = require('nextra');
2+
const nextra = typeof nextraRaw === 'function' ? nextraRaw : nextraRaw.default || nextraRaw;
3+
4+
const withNextra = nextra({
25
theme: 'nextra-theme-docs',
36
themeConfig: './theme.config.tsx'
4-
})
7+
});
58

69
module.exports = withNextra({
710
async redirects() {

0 commit comments

Comments
 (0)