-
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
3 changed files
with
19 additions
and
50 deletions.
There are no files selected for viewing
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
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
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,40 +1,11 @@ | ||
// Original Next.js config | ||
const withNextra = require("nextra")({ | ||
theme: "nextra-theme-docs", | ||
themeConfig: "./theme.config.tsx", | ||
}); | ||
|
||
module.exports = { | ||
reactStrictMode: true, | ||
output: 'export', | ||
...withNextra(), | ||
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) | ||
}; |