Files
Homarr/apps/nextjs/next.config.mjs

44 lines
1.4 KiB
JavaScript
Raw Normal View History

2023-12-08 22:35:15 +01:00
// Importing env files here to validate on build
import "@homarr/auth/env.mjs";
import "@homarr/db/env.mjs";
import "@homarr/common/env.mjs";
import MillionLint from "@million/lint";
import createNextIntlPlugin from "next-intl/plugin";
feat: add docker container table (#520) * WIP On docker integration * WIP on adding docker support * WIP on adding docker support * chore: Add cacheTime parameter to createCacheChannel function * bugfix: Add node-loader npm dependency for webpack configuration * revert changes * chore: Add node-loader npm dependency for webpack configuration * feat: Add Docker container list to DockerPage * chore: apply pr suggestions * fix: fix printing issue using a Date objext * chore: Update npm dependencies * feat: Create DockerTable component for displaying Docker container list * feat: Refactor DockerPage to use DockerTable component * feat: Refactor DockerPage to use DockerTable component * feat: Add useTimeAgo hook for displaying relative timestamps * feat: Add hooks module to common package * refactor: Update DockerTable component Include container actions and state badges * feat: add information about instance for docker containers * feat: Add OverflowBadge component for displaying overflowed data * feat: Refactor DockerSingleton to use host and instance properties This commit refactors the DockerSingleton class in the `docker.ts` file to use the `host` and `instance` properties instead of the previous `key` and `remoteApi` properties. This change improves clarity and consistency in the codebase. * feat: Add OverflowBadge component for displaying overflowed data * feat: Improve DockerTable component with Avatar and Name column This commit enhances the DockerTable component in the `DockerTable.tsx` file by adding an Avatar and Name column. The Avatar column displays an icon based on the Docker container's image, while the Name column shows the container's name. This improvement provides better visual representation and identification of the containers in the table. * feat: Enhance DockerTable component with Avatar and Name columns * refactor: improve docker table and icon resolution * chore: address pull request feedback * fix: format issues * chore: add missing translations * refactor: remove black background --------- Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
2024-05-29 21:57:02 +02:00
import "./src/env.mjs";
2023-12-08 22:35:15 +01: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} */
const nextConfig = {
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 },
webpack: (config, { isServer }) => {
if (isServer) {
config.module.rules.push({
test: /\.node$/,
loader: "node-loader",
});
}
feat: add docker container table (#520) * WIP On docker integration * WIP on adding docker support * WIP on adding docker support * chore: Add cacheTime parameter to createCacheChannel function * bugfix: Add node-loader npm dependency for webpack configuration * revert changes * chore: Add node-loader npm dependency for webpack configuration * feat: Add Docker container list to DockerPage * chore: apply pr suggestions * fix: fix printing issue using a Date objext * chore: Update npm dependencies * feat: Create DockerTable component for displaying Docker container list * feat: Refactor DockerPage to use DockerTable component * feat: Refactor DockerPage to use DockerTable component * feat: Add useTimeAgo hook for displaying relative timestamps * feat: Add hooks module to common package * refactor: Update DockerTable component Include container actions and state badges * feat: add information about instance for docker containers * feat: Add OverflowBadge component for displaying overflowed data * feat: Refactor DockerSingleton to use host and instance properties This commit refactors the DockerSingleton class in the `docker.ts` file to use the `host` and `instance` properties instead of the previous `key` and `remoteApi` properties. This change improves clarity and consistency in the codebase. * feat: Add OverflowBadge component for displaying overflowed data * feat: Improve DockerTable component with Avatar and Name column This commit enhances the DockerTable component in the `DockerTable.tsx` file by adding an Avatar and Name column. The Avatar column displays an icon based on the Docker container's image, while the Name column shows the container's name. This improvement provides better visual representation and identification of the containers in the table. * feat: Enhance DockerTable component with Avatar and Name columns * refactor: improve docker table and icon resolution * chore: address pull request feedback * fix: format issues * chore: add missing translations * refactor: remove black background --------- Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
2024-05-29 21:57:02 +02:00
return config;
},
experimental: {
optimizePackageImports: ["@mantine/core", "@mantine/hooks", "@tabler/icons-react"],
},
transpilePackages: ["@homarr/ui", "@homarr/notifications", "@homarr/modals", "@homarr/spotlight", "@homarr/widgets"],
images: {
domains: ["cdn.jsdelivr.net"],
},
2023-12-08 22:35:15 +01: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 });
export default withNextIntl(nextConfig);