chore(config): change next-config from mjs to typescript (#1861)
This commit is contained in:
@@ -39,7 +39,7 @@ RUN mkdir -p /var/cache/nginx && \
|
|||||||
touch /run/nginx/nginx.pid && \
|
touch /run/nginx/nginx.pid && \
|
||||||
mkdir -p /etc/nginx/templates /etc/nginx/ssl/certs
|
mkdir -p /etc/nginx/templates /etc/nginx/ssl/certs
|
||||||
|
|
||||||
COPY --from=builder /app/apps/nextjs/next.config.mjs .
|
COPY --from=builder /app/apps/nextjs/next.config.ts .
|
||||||
COPY --from=builder /app/apps/nextjs/package.json .
|
COPY --from=builder /app/apps/nextjs/package.json .
|
||||||
|
|
||||||
COPY --from=builder /app/apps/tasks/tasks.cjs ./apps/tasks/tasks.cjs
|
COPY --from=builder /app/apps/tasks/tasks.cjs ./apps/tasks/tasks.cjs
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import "@homarr/auth/env.mjs";
|
|||||||
import "@homarr/db/env.mjs";
|
import "@homarr/db/env.mjs";
|
||||||
import "@homarr/common/env.mjs";
|
import "@homarr/common/env.mjs";
|
||||||
|
|
||||||
|
import type { NextConfig } from "next";
|
||||||
import MillionLint from "@million/lint";
|
import MillionLint from "@million/lint";
|
||||||
import createNextIntlPlugin from "next-intl/plugin";
|
import createNextIntlPlugin from "next-intl/plugin";
|
||||||
|
|
||||||
@@ -11,14 +12,22 @@ import "./src/env.mjs";
|
|||||||
// Package path does not work... so we need to use relative path
|
// Package path does not work... so we need to use relative path
|
||||||
const withNextIntl = createNextIntlPlugin("../../packages/translation/src/request.ts");
|
const withNextIntl = createNextIntlPlugin("../../packages/translation/src/request.ts");
|
||||||
|
|
||||||
/** @type {import("next").NextConfig} */
|
interface WebpackConfig {
|
||||||
const nextConfig = {
|
module: {
|
||||||
|
rules: {
|
||||||
|
test: RegExp;
|
||||||
|
loader: string;
|
||||||
|
}[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
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, { isServer }) => {
|
webpack: (config: WebpackConfig, { isServer }) => {
|
||||||
if (isServer) {
|
if (isServer) {
|
||||||
config.module.rules.push({
|
config.module.rules.push({
|
||||||
test: /\.node$/,
|
test: /\.node$/,
|
||||||
@@ -38,6 +47,7 @@ const nextConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Skip transform is used because of webpack loader, without it for example 'Tooltip.Floating' will not work and show an error
|
// Skip transform is used because of webpack loader, without it for example 'Tooltip.Floating' will not work and show an error
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const withMillionLint = MillionLint.next({ rsc: true, skipTransform: true, telemetry: false });
|
const withMillionLint = MillionLint.next({ rsc: true, skipTransform: true, telemetry: false });
|
||||||
|
|
||||||
export default withNextIntl(nextConfig);
|
export default withNextIntl(nextConfig);
|
||||||
Reference in New Issue
Block a user