Add support for MCP in export mode

This commit is contained in:
YISH
2025-05-08 13:27:04 +08:00
parent 3809375694
commit d1baabae14
8 changed files with 198 additions and 51 deletions

View File

@@ -6,9 +6,15 @@ console.log("[Next] build mode", mode);
const disableChunk = !!process.env.DISABLE_CHUNK || mode === "export";
console.log("[Next] build with chunk: ", !disableChunk);
const EXPORT_MODE = mode === "export";
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config) {
config.plugins.push(new webpack.DefinePlugin({
EXPORT_MODE: EXPORT_MODE
}));
config.module.rules.push({
test: /\.svg$/,
use: ["@svgr/webpack"],