From d62bbff1f069f09093fda1d8de45d3526824fe63 Mon Sep 17 00:00:00 2001 From: Trance-0 <60459821+Trance-0@users.noreply.github.com> Date: Mon, 24 Nov 2025 15:44:18 -0600 Subject: [PATCH] backup --- distribute/next.config.mjs | 43 ++++++++++++++++++++++++++++++++++++++ distribute/prebuild.sh | 4 ++++ 2 files changed, 47 insertions(+) create mode 100644 distribute/next.config.mjs diff --git a/distribute/next.config.mjs b/distribute/next.config.mjs new file mode 100644 index 0000000..1743217 --- /dev/null +++ b/distribute/next.config.mjs @@ -0,0 +1,43 @@ +import nextra from 'nextra' +import withBundleAnalyzer from '@next/bundle-analyzer' + +const withNextra = nextra({ + latex: { + renderer: 'katex', + options: { + // suppress warnings from katex for `\\` + strict: false, + } + }, + mdxOptions: { + format: 'detect' + }, + contentDirBasePath: '/' +}) + +const bundleAnalyzer = withBundleAnalyzer({ + enabled: process.env.ANALYZE === 'true' +}) + +export default bundleAnalyzer(withNextra({ + + // static export start + output: 'export', + images: { + unoptimized: true // mandatory, otherwise won't export + }, + // static export end + + // eslint: { + // ignoreDuringBuilds: true, + // }, + // compiler: { + // // enable console log in production + // removeConsole: false, + // }, + // experimental: { + // webpackMemoryOptimizations: true, + // staticGenerationMaxConcurrency: 2, // try 1–3, default is 8 + // staticGenerationMinPagesPerWorker: 1 // keep small, default is 25 + // } +})) \ No newline at end of file diff --git a/distribute/prebuild.sh b/distribute/prebuild.sh index 25def83..68375fd 100644 --- a/distribute/prebuild.sh +++ b/distribute/prebuild.sh @@ -25,4 +25,8 @@ done echo "Done clearing up resources and compiling for ${KEEP_PAGES}" +echo "modify next.config.js" + +cp ./next.config.js ../next.config.js +