This repository has been archived on 2023-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
imageify/next.config.js

41 lines
856 B
JavaScript
Raw Permalink Normal View History

2022-11-17 07:29:57 +00:00
const imageUrlParts = process.env.NEXT_PUBLIC_SITE_URL
? process.env.NEXT_PUBLIC_SITE_URL.split("://")
: "http://localhost:3000".split("://"); // To make tests pass
2022-11-17 06:23:45 +00:00
2022-11-17 06:47:31 +00:00
/** @type {import('next').NextConfig} */
2022-11-13 19:21:34 +00:00
const nextConfig = {
2022-11-14 00:08:16 +00:00
reactStrictMode: true,
2022-11-14 03:31:42 +00:00
output: "standalone",
2022-11-14 02:32:02 +00:00
swcMinify: true,
optimizeFonts: true,
2022-11-17 09:02:39 +00:00
poweredByHeader: false,
2022-11-17 06:47:31 +00:00
experimental: {
2022-11-17 09:58:00 +00:00
// Will leave disabled for now as it causes
// cpu usage spikes when loading a page
//optimizeCss: true,
},
2022-11-17 11:24:19 +00:00
// compiler: {
// removeConsole: {
// exclude: ["error"],
// },
// },
2022-11-13 19:21:34 +00:00
2022-11-14 00:08:16 +00:00
images: {
remotePatterns: [
{
protocol: "http",
hostname: "localhost",
2022-11-17 06:23:45 +00:00
port: "3000",
2022-11-17 05:58:42 +00:00
pathname: "/api/files/**",
},
{
2022-11-17 06:23:45 +00:00
protocol: imageUrlParts[0],
hostname: imageUrlParts[1].split(":")[0],
2022-11-14 00:08:16 +00:00
pathname: "/api/files/**",
},
],
},
};
module.exports = nextConfig;