mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 23:56:39 +08:00
test pack
This commit is contained in:
parent
14faccb1a6
commit
942b48de69
@ -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" },
|
||||
|
Loading…
Reference in New Issue
Block a user