mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
feat(providers): integrate ChatGPT Web provider (#1593)
This commit is contained in:
@@ -1,19 +1,24 @@
|
||||
import createNextIntlPlugin from "next-intl/plugin";
|
||||
import { dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const withNextIntl = createNextIntlPlugin("./src/i18n/request.ts");
|
||||
const distDir = process.env.NEXT_DIST_DIR || ".next";
|
||||
const projectRoot = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
distDir,
|
||||
// Turbopack config: redirect native modules to stubs at build time
|
||||
turbopack: {
|
||||
root: projectRoot,
|
||||
resolveAlias: {
|
||||
// Point mitm/manager to a stub during build (native child_process/fs can't be bundled)
|
||||
"@/mitm/manager": "./src/mitm/manager.stub.ts",
|
||||
},
|
||||
},
|
||||
output: "standalone",
|
||||
outputFileTracingRoot: projectRoot,
|
||||
outputFileTracingExcludes: {
|
||||
// Planning/task docs are not runtime assets and can break standalone copies
|
||||
// when broad fs/path tracing pulls the whole repository into the NFT graph.
|
||||
@@ -28,12 +33,14 @@ const nextConfig = {
|
||||
"./playwright-report/**/*",
|
||||
"./app.__qa_backup/**/*",
|
||||
"./tests/**/*",
|
||||
"./logs/**/*",
|
||||
],
|
||||
},
|
||||
serverExternalPackages: [
|
||||
"pino",
|
||||
"pino-pretty",
|
||||
"thread-stream",
|
||||
"pino-abstract-transport",
|
||||
"better-sqlite3",
|
||||
"keytar",
|
||||
"wreq-js",
|
||||
@@ -53,8 +60,9 @@ const nextConfig = {
|
||||
"stream",
|
||||
"buffer",
|
||||
"util",
|
||||
"process",
|
||||
],
|
||||
transpilePackages: ["@omniroute/open-sse"],
|
||||
transpilePackages: ["@omniroute/open-sse", "@lobehub/icons"],
|
||||
allowedDevOrigins: ["localhost", "127.0.0.1", "192.168.*"],
|
||||
typescript: {
|
||||
// TODO: Re-enable after fixing all sub-component useTranslations scope issues
|
||||
@@ -98,6 +106,7 @@ const nextConfig = {
|
||||
"zod",
|
||||
"pino",
|
||||
"pino-pretty",
|
||||
"pino-abstract-transport",
|
||||
"child_process",
|
||||
"fs",
|
||||
"path",
|
||||
@@ -110,6 +119,7 @@ const nextConfig = {
|
||||
"stream",
|
||||
"buffer",
|
||||
"util",
|
||||
"process",
|
||||
]);
|
||||
|
||||
const prev = config.externals ?? [];
|
||||
@@ -144,6 +154,7 @@ const nextConfig = {
|
||||
net: false,
|
||||
tls: false,
|
||||
crypto: false,
|
||||
process: false,
|
||||
};
|
||||
}
|
||||
return config;
|
||||
|
||||
Reference in New Issue
Block a user