2023-12-08 22:35:15 +01:00
|
|
|
// Importing env files here to validate on build
|
2024-01-02 14:18:37 +01:00
|
|
|
import "@homarr/auth/env.mjs";
|
2024-12-19 17:48:10 +01:00
|
|
|
import "@homarr/db/env.mjs";
|
2024-12-31 11:30:29 +01:00
|
|
|
import "@homarr/common/env.mjs";
|
2024-08-29 22:25:51 +02:00
|
|
|
|
|
|
|
|
import MillionLint from "@million/lint";
|
2024-10-26 22:46:14 +02:00
|
|
|
import createNextIntlPlugin from "next-intl/plugin";
|
2024-08-29 22:25:51 +02:00
|
|
|
|
2024-05-29 21:57:02 +02:00
|
|
|
import "./src/env.mjs";
|
2023-12-08 22:35:15 +01:00
|
|
|
|
2024-10-26 22:46:14 +02:00
|
|
|
// Package path does not work... so we need to use relative path
|
|
|
|
|
const withNextIntl = createNextIntlPlugin("../../packages/translation/src/request.ts");
|
|
|
|
|
|
2023-12-08 22:35:15 +01:00
|
|
|
/** @type {import("next").NextConfig} */
|
2024-10-26 22:46:14 +02:00
|
|
|
const nextConfig = {
|
2024-03-16 15:51:34 +01:00
|
|
|
output: "standalone",
|
2023-12-08 22:35:15 +01:00
|
|
|
reactStrictMode: true,
|
|
|
|
|
/** We already do linting and typechecking as separate tasks in CI */
|
|
|
|
|
eslint: { ignoreDuringBuilds: true },
|
|
|
|
|
typescript: { ignoreBuildErrors: true },
|
2024-07-25 19:52:31 +02:00
|
|
|
webpack: (config, { isServer }) => {
|
|
|
|
|
if (isServer) {
|
|
|
|
|
config.module.rules.push({
|
|
|
|
|
test: /\.node$/,
|
|
|
|
|
loader: "node-loader",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-29 21:57:02 +02:00
|
|
|
return config;
|
|
|
|
|
},
|
2023-12-09 00:32:45 +01:00
|
|
|
experimental: {
|
2024-05-19 22:38:39 +02:00
|
|
|
optimizePackageImports: ["@mantine/core", "@mantine/hooks", "@tabler/icons-react"],
|
2023-12-09 00:32:45 +01:00
|
|
|
},
|
2024-05-19 22:38:39 +02:00
|
|
|
transpilePackages: ["@homarr/ui", "@homarr/notifications", "@homarr/modals", "@homarr/spotlight", "@homarr/widgets"],
|
2024-01-02 17:12:26 +01:00
|
|
|
images: {
|
|
|
|
|
domains: ["cdn.jsdelivr.net"],
|
|
|
|
|
},
|
2023-12-08 22:35:15 +01:00
|
|
|
};
|
|
|
|
|
|
2024-08-29 22:25:51 +02:00
|
|
|
// Skip transform is used because of webpack loader, without it for example 'Tooltip.Floating' will not work and show an error
|
|
|
|
|
const withMillionLint = MillionLint.next({ rsc: true, skipTransform: true, telemetry: false });
|
|
|
|
|
|
2024-10-26 22:46:14 +02:00
|
|
|
export default withNextIntl(nextConfig);
|