From fe7ceb60b253470b7ef6ec2d615c321039632104 Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Sun, 19 Jan 2025 01:09:20 -0500 Subject: [PATCH] Fix Build Issues --- cache-handler.ts => cache-handler.mts | 0 instrumentation.ts | 2 +- next.config.ts | 2 +- tsconfig.json | 8 +++++++- 4 files changed, 9 insertions(+), 3 deletions(-) rename cache-handler.ts => cache-handler.mts (100%) diff --git a/cache-handler.ts b/cache-handler.mts similarity index 100% rename from cache-handler.ts rename to cache-handler.mts diff --git a/instrumentation.ts b/instrumentation.ts index 4d4f5d6..dab2871 100644 --- a/instrumentation.ts +++ b/instrumentation.ts @@ -8,7 +8,7 @@ export async function register() { '@neshca/cache-handler/instrumentation' ); - const CacheHandler = (await import('./cache-handler')).default; + const CacheHandler = (await import('./cache-handler.mjs')).default; await registerInitialCache(CacheHandler); } diff --git a/next.config.ts b/next.config.ts index 5535f68..45e0e8a 100644 --- a/next.config.ts +++ b/next.config.ts @@ -53,7 +53,7 @@ const nextConfig: NextConfig = { }, cacheHandler: process.env.NODE_ENV === 'production' - ? require.resolve('./cache-handler') + ? require.resolve('./cache-handler.mts') : undefined, }; diff --git a/tsconfig.json b/tsconfig.json index 3580385..1e47579 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,6 +24,12 @@ }, "forceConsistentCasingInFileNames": true }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts", + "cache-handler.mts" + ], "exclude": ["node_modules"] }