From 0873c2cb7eaba2b2b2c11372e5ab4ef07d7778ee Mon Sep 17 00:00:00 2001 From: Diego Carvalho Date: Wed, 12 Jun 2024 10:31:32 -0300 Subject: [PATCH] fix: build admin ui around import ESM modules --- packages/core/src/admin-ui/templates/next-config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/src/admin-ui/templates/next-config.ts b/packages/core/src/admin-ui/templates/next-config.ts index 13fa92b7398..9336e413735 100644 --- a/packages/core/src/admin-ui/templates/next-config.ts +++ b/packages/core/src/admin-ui/templates/next-config.ts @@ -1,5 +1,9 @@ export const nextConfigTemplate = (basePath?: string) => `const nextConfig = { + // Experimental ESM Externals + // https://nextjs.org/docs/messages/import-esm-externals + // required to fix build admin ui issues related to "react-day-picker" and "date-fn" + experimental: { esmExternals: 'loose' }, typescript: { ignoreBuildErrors: true, },