From 1b3770aafbe4e903e6235dc681edac556a36e4e0 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sat, 7 Jun 2025 16:19:09 +0200 Subject: [PATCH] fix: module not found sshcrypto.node during development (#3349) --- apps/nextjs/next.config.ts | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/apps/nextjs/next.config.ts b/apps/nextjs/next.config.ts index c3a349d24..6543618e5 100644 --- a/apps/nextjs/next.config.ts +++ b/apps/nextjs/next.config.ts @@ -17,31 +17,16 @@ const withNextIntl = createNextIntlPlugin({ requestConfig: "../../packages/translation/src/request.ts", }); -interface WebpackConfig { - module: { - rules: { - test: RegExp; - loader: string; - }[]; - }; -} - const nextConfig: NextConfig = { output: "standalone", reactStrictMode: true, /** We already do linting and typechecking as separate tasks in CI */ eslint: { ignoreDuringBuilds: true }, typescript: { ignoreBuildErrors: true }, - webpack: (config: WebpackConfig, { isServer }) => { - if (isServer) { - config.module.rules.push({ - test: /\.node$/, - loader: "node-loader", - }); - } - - return config; - }, + /** + * dockerode is required in the external server packages because of https://github.com/homarr-labs/homarr/issues/612 + */ + serverExternalPackages: ["dockerode"], experimental: { optimizePackageImports: ["@mantine/core", "@mantine/hooks", "@tabler/icons-react"], },