Files
Homarr/apps/nextjs/next.config.mjs
Thomas Camlong 94984ac11b feat: add million-lint (#607)
* feat: Add `million-lint`

* fix: some parts not working because of missing skipTransform flag

* chore: address pull request feedback

* chore: make with-million-lint method that can be used when debugging performance

* fix: format issue

* fix: format issue

---------

Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
2024-08-29 22:25:51 +02:00

38 lines
1.1 KiB
JavaScript

// Importing env files here to validate on build
import "@homarr/auth/env.mjs";
import MillionLint from "@million/lint";
import "./src/env.mjs";
/** @type {import("next").NextConfig} */
const config = {
output: "standalone",
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",
});
}
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"],
},
};
// 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 config;