diff --git a/config/prepareDist.js b/config/prepareDist.js index 747ef55f337..2f90faab8f9 100644 --- a/config/prepareDist.js +++ b/config/prepareDist.js @@ -44,9 +44,18 @@ packageJson.exports = { import: packageJson.module, require: packageJson.main, }, + "./index.js": { + types: packageJson.types, + import: packageJson.module, + require: packageJson.main, + }, "./package.json": { default: "./package.json", }, + // related to issue #8605 + "./apollo-client.cjs": { + require: "./apollo-client.cjs", + }, ...entryPoints.reduce((acc, { dirs, bundleName = dirs[dirs.length - 1] }) => { if (!dirs.length) return acc; const path = `./${dirs.join("/")}`;