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";
|
import webpack from "webpack";
|
||||||
// debug build
|
// debug build
|
||||||
import { createRequire } from 'module';
|
// import { createRequire } from 'module';
|
||||||
const require = createRequire(import.meta.url);
|
// const require = createRequire(import.meta.url);
|
||||||
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
// const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
||||||
enabled: process.env.ANALYZE === 'true',
|
// enabled: process.env.ANALYZE === 'true',
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
// import CssMinimizerPlugin from "css-minimizer-webpack-plugin";
|
// 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'
|
// const isProd = process.env.NODE_ENV === 'production'
|
||||||
|
|
||||||
// 为了修复tiktoken的插件问题
|
// 为了修复tiktoken的插件问题
|
||||||
const nextConfig = withBundleAnalyzer({
|
const nextConfig = {
|
||||||
// transpilePackages: ['tiktoken'],
|
// transpilePackages: ['tiktoken'],
|
||||||
webpack(config) {
|
webpack(config) {
|
||||||
config.module.rules.push({
|
config.module.rules.push({
|
||||||
@ -93,7 +93,7 @@ const nextConfig = withBundleAnalyzer({
|
|||||||
// 'sharp': 'commonjs sharp'
|
// 'sharp': 'commonjs sharp'
|
||||||
// },
|
// },
|
||||||
swcMinify: true,
|
swcMinify: true,
|
||||||
});
|
};
|
||||||
|
|
||||||
const CorsHeaders = [
|
const CorsHeaders = [
|
||||||
{ key: "Access-Control-Allow-Credentials", value: "true" },
|
{ key: "Access-Control-Allow-Credentials", value: "true" },
|
||||||
|
Loading…
Reference in New Issue
Block a user