fix: module not found sshcrypto.node during development (#3349)
This commit is contained in:
@@ -17,31 +17,16 @@ const withNextIntl = createNextIntlPlugin({
|
|||||||
requestConfig: "../../packages/translation/src/request.ts",
|
requestConfig: "../../packages/translation/src/request.ts",
|
||||||
});
|
});
|
||||||
|
|
||||||
interface WebpackConfig {
|
|
||||||
module: {
|
|
||||||
rules: {
|
|
||||||
test: RegExp;
|
|
||||||
loader: string;
|
|
||||||
}[];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
/** We already do linting and typechecking as separate tasks in CI */
|
/** We already do linting and typechecking as separate tasks in CI */
|
||||||
eslint: { ignoreDuringBuilds: true },
|
eslint: { ignoreDuringBuilds: true },
|
||||||
typescript: { ignoreBuildErrors: true },
|
typescript: { ignoreBuildErrors: true },
|
||||||
webpack: (config: WebpackConfig, { isServer }) => {
|
/**
|
||||||
if (isServer) {
|
* dockerode is required in the external server packages because of https://github.com/homarr-labs/homarr/issues/612
|
||||||
config.module.rules.push({
|
*/
|
||||||
test: /\.node$/,
|
serverExternalPackages: ["dockerode"],
|
||||||
loader: "node-loader",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return config;
|
|
||||||
},
|
|
||||||
experimental: {
|
experimental: {
|
||||||
optimizePackageImports: ["@mantine/core", "@mantine/hooks", "@tabler/icons-react"],
|
optimizePackageImports: ["@mantine/core", "@mantine/hooks", "@tabler/icons-react"],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user