diff --git a/next.config.mjs b/next.config.mjs index 0c75dedc2..74af2af50 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,10 +1,10 @@ import webpack from "webpack"; // debug build -import { createRequire } from 'module'; -const require = createRequire(import.meta.url); -const withBundleAnalyzer = require('@next/bundle-analyzer')({ - enabled: process.env.ANALYZE === 'true', -}); +// import { createRequire } from 'module'; +// const require = createRequire(import.meta.url); +// const withBundleAnalyzer = require('@next/bundle-analyzer')({ +// enabled: process.env.ANALYZE === 'true', +// }); // import CssMinimizerPlugin from "css-minimizer-webpack-plugin"; @@ -19,7 +19,7 @@ console.log("[Next] build with chunk: ", disableChunk); // const isProd = process.env.NODE_ENV === 'production' // 为了修复tiktoken的插件问题 -const nextConfig = withBundleAnalyzer({ +const nextConfig = { // transpilePackages: ['tiktoken'], webpack(config) { config.module.rules.push({ @@ -93,7 +93,7 @@ const nextConfig = withBundleAnalyzer({ // 'sharp': 'commonjs sharp' // }, swcMinify: true, -}); +}; const CorsHeaders = [ { key: "Access-Control-Allow-Credentials", value: "true" },