hexabot/frontend/next.config.mjs
2024-09-10 10:50:11 +01:00

37 lines
816 B
JavaScript

/** @type {import('next').NextConfig} */
import withTM from "next-transpile-modules";
const apiUrl = process.env.NEXT_PUBLIC_API_ORIGIN || "http://localhost:4000/";
const url = new URL(apiUrl);
const nextConfig = withTM(["hexabot-widget"])({
webpack(config, _options) {
return config;
},
publicRuntimeConfig: {
apiUrl,
ssoEnabled: process.env.NEXT_PUBLIC_SSO_ENABLED === "true",
lang: {
default: "en",
},
},
output: "standalone",
images: {
remotePatterns: [
{
protocol: "https",
hostname: url.hostname,
port: url.port,
pathname: "/attachment/**",
},
{
protocol: "http",
hostname: url.hostname,
port: url.port,
pathname: "/attachment/**",
},
],
},
});
export default nextConfig;