Skip to content

Commit 409d953

Browse files
committed
build: use different base path for dev and prod
1 parent ae50cd1 commit 409d953

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/next.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
const isProd = process.env.NODE_ENV === 'production';
2+
13
const withNextra = require('nextra')({
24
theme: 'nextra-theme-docs',
35
themeConfig: './theme.config.tsx',
46
defaultShowCopyCode: true,
57
});
68

79
module.exports = withNextra({
8-
basePath: '/docs'
10+
basePath: isProd ? '/docs' : '',
911
});

0 commit comments

Comments
 (0)