diff --git a/packages/core/package.json b/packages/core/package.json index b0e6127c9..d0b885e15 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -26,6 +26,7 @@ "./react": { "react-server": { "import": "./dist/mjs/rsc/index.js", + "require": "./dist/cjs/rsc/index.js", "types": "./dist/mjs/rsc/index.d.ts" }, "require": "./dist/cjs/react/index.js", diff --git a/packages/next/package.json b/packages/next/package.json index 5f1f24196..4a6ba8cb3 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -27,6 +27,7 @@ }, "./app": { "import": "./dist/mjs/rsc/index.js", + "require": "./dist/cjs/rsc/index.js", "types": "./dist/mjs/rsc/index.d.ts" } }, diff --git a/projects/wp-nextjs-app/next.config.js b/projects/wp-nextjs-app/next.config.js index 3aea7dbd8..191842431 100644 --- a/projects/wp-nextjs-app/next.config.js +++ b/projects/wp-nextjs-app/next.config.js @@ -2,15 +2,6 @@ const { withHeadstartWPConfig } = require('@headstartwp/next/config'); /** @type {import('next').NextConfig} */ const nextConfig = { - webpack: (config) => { - // TODO: figure out why this is needed - config.resolve = { - ...config.resolve, - conditionNames: ['import'], - }; - - return config; - }, logging: { fetches: { fullUrl: true,