diff --git a/next.config.js b/next.config.mjs similarity index 59% rename from next.config.js rename to next.config.mjs index 113fd61..55f6899 100644 --- a/next.config.js +++ b/next.config.mjs @@ -1,13 +1,10 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -const withBundleAnalyzer = require("@next/bundle-analyzer")({ - enabled: process.env.ANALYZE === "true", -}) -const withPlugins = require("next-compose-plugins") +import withBundleAnalyzer from "@next/bundle-analyzer" +import withPlugins from "next-compose-plugins" /** * @type {import('next').NextConfig} */ -module.exports = withPlugins([[withBundleAnalyzer]], { +const config = withPlugins([[withBundleAnalyzer({ enabled: process.env.ANALYZE === "true" })]], { reactStrictMode: true, experimental: { instrumentationHook: true }, rewrites() { @@ -19,3 +16,5 @@ module.exports = withPlugins([[withBundleAnalyzer]], { ] }, }) + +export default config diff --git a/tsconfig.json b/tsconfig.json index 5d88d20..32b3fdd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,6 +18,6 @@ "incremental": true, "baseUrl": "." }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.mjs"], "exclude": ["node_modules"] }