-
Notifications
You must be signed in to change notification settings - Fork 69
/
next.config.mjs
65 lines (58 loc) · 1.73 KB
/
next.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/** @type {import('next').NextConfig} */
import { withSentryConfig } from "@sentry/nextjs";
import { fileURLToPath } from "url";
let nextConfig = {
images: {
remotePatterns: [
{ hostname: "icon.horse" },
{ hostname: "icons.duckduckgo.com" },
{ hostname: "www.google.com" },
{ hostname: "zyqdiwxgffuy8ymd.public.blob.vercel-storage.com" },
],
},
webpack: (config, options) => {
// Configuration for @electric-sql/pglite
config.module.rules.push({
test: /\.+(js|jsx|mjs|ts|tsx)$/,
use: options.defaultLoaders.babel,
include: fileURLToPath(import.meta.resolve("@electric-sql/pglite")),
type: "javascript/auto",
});
if (!options.isServer) {
config.resolve.fallback = { fs: false, module: false, path: false };
}
// Existing SQL loader configuration
config.module.rules.push({
test: /\.sql$/,
use: "raw-loader",
});
// Experimental features
config.experiments = {
...config.experiments,
topLevelAwait: true,
layers: true,
};
return config;
},
transpilePackages: ["@electric-sql/pglite-repl", "@electric-sql/pglite"],
// Existing rewrites and redirects
async rewrites() {
return [
{ source: "/settings/llms", destination: "/settings/llms/openai" },
{ source: "/settings", destination: "/settings/common" },
];
},
async redirects() {
return [{ source: "/", destination: "/chat", permanent: true }];
},
};
export default withSentryConfig(nextConfig, {
// Sentry configuration (unchanged)
org: "saascollect",
project: "javascript-nextjs",
silent: !process.env.CI,
widenClientFileUpload: true,
hideSourceMaps: true,
disableLogger: true,
automaticVercelMonitors: true,
});