From dfbf1c7e4a232058902330946965a45189abe307 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 19 Dec 2024 09:13:45 +0100 Subject: [PATCH] update next config: use mjs instead of js --- site/{next.config.js => next.config.mjs} | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) rename site/{next.config.js => next.config.mjs} (87%) diff --git a/site/next.config.js b/site/next.config.mjs similarity index 87% rename from site/next.config.js rename to site/next.config.mjs index 7e6780a2d..645520628 100644 --- a/site/next.config.js +++ b/site/next.config.mjs @@ -1,12 +1,13 @@ -/* eslint-disable */ - // @ts-check -const withBundleAnalyzer = require("@next/bundle-analyzer")({ + +import nextBundleAnalyzer from "@next/bundle-analyzer"; + +import cometConfig from "./src/comet-config.json" with { type: "json" }; + +const withBundleAnalyzer = nextBundleAnalyzer({ enabled: process.env.ANALYZE === "true", }); -const cometConfig = require("./src/comet-config.json"); - /** * @type {import('next').NextConfig} **/ @@ -56,4 +57,4 @@ const nextConfig = { cacheMaxMemorySize: process.env.REDIS_ENABLED === "true" ? 0 : undefined, // disable default in-memory caching }; -module.exports = withBundleAnalyzer(nextConfig); +export default withBundleAnalyzer(nextConfig);