-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
36 additions
and
93 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,40 @@ | ||
const withNextra = require('nextra')({ | ||
theme: 'nextra-theme-docs', | ||
themeConfig: './theme.config.tsx', | ||
}) | ||
|
||
// Original Next.js config | ||
module.exports = { | ||
...withNextra(), | ||
reactStrictMode: true, | ||
output: 'export', | ||
images: { | ||
// output: export doesn't support Next.js image optimization | ||
unoptimized: true, | ||
}, | ||
}; | ||
// Next.js doesn't support trailing slashes in basePath | ||
// This config needs to be in sync with export-images.config.js | ||
basePath: (process.env.WEBSITE_BASE_PATH || '').replace(/\/$/, ""), | ||
webpack: (config) => { | ||
// Add Typescript support | ||
// Reference: https://www.altogic.com/blog/nextjs-typescript | ||
config.resolve.extensions.push(".ts", ".tsx"); | ||
return config; | ||
}, | ||
eslint: { | ||
dirs: [ | ||
'pages', | ||
'src', | ||
'app', | ||
'components', | ||
'lib', | ||
'theme.config.jsx', | ||
"tailwind.config.js", | ||
"next.config.js", | ||
"postcss.config.js", | ||
] | ||
} | ||
} | ||
|
||
// Add Nextra config | ||
const withNextra = require('nextra')({ | ||
theme: 'nextra-theme-docs', | ||
themeConfig: './theme.config.tsx', | ||
latex: true, // LaTeX support: https://nextra.site/docs/guide/advanced/latex | ||
}); | ||
|
||
module.exports = withNextra(module.exports) |