Files
OpenLLM/docs/next.config.mjs
Aaron Pham fddd0bf95e feat: bootstrap documentation site (#252)
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Signed-off-by: GutZuFusss <leon.ikinger@googlemail.com>
Co-authored-by: GutZuFusss <leon.ikinger@googlemail.com>
2023-09-12 12:28:29 -04:00

25 lines
557 B
JavaScript

import nextra from 'nextra'
const withNextra = nextra({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
latex: true,
defaultShowCopyCode: true
})
export default withNextra({
reactStrictMode: true,
webpack(config) {
const allowedSvgRegex = /components\/icons\/.+\.svg$/
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test('.svg'))
fileLoaderRule.exclude = allowedSvgRegex
config.module.rules.push({
test: allowedSvgRegex,
use: ['@svgr/webpack']
})
return config
}
})