import createJiti from "jiti" import { pageNames } from "./constants/myPages.js" const jiti = createJiti(new URL(import.meta.url).pathname) jiti("./env/server") jiti("./env/client") /** @type {import('next').NextConfig} */ const nextConfig = { eslint: { ignoreDuringBuilds: true }, images: { remotePatterns: [ { protocol: "https", hostname: "eu-images.contentstack.com", pathname: "/v3/assets/**", }, { protocol: "https", hostname: "imagevault-stage.scandichotels.com", }, { protocol: "https", hostname: "imagevault.scandichotels.com", }, ], }, logging: { fetches: { fullUrl: true, }, }, output: "standalone", webpack: function (config, options) { config.module.rules.push({ test: /\.(graphql|gql)/, exclude: /node_modules/, loader: "graphql-tag/loader", }) return config }, rewrites() { return { beforeFiles: [ { source: `/da/${pageNames.da}`, destination: "/da/my-pages" }, { source: `/de/${pageNames.de}`, destination: "/de/my-pages" }, { source: `/fi/${pageNames.fi}`, destination: "/fi/my-pages" }, { source: `/no/${pageNames.no}`, destination: "/no/my-pages" }, { source: `/sv/${pageNames.sv}`, destination: "/sv/my-pages" }, ], } }, } export default nextConfig