Skip to content

Commit

Permalink
Advertise sideEffects in @apollo/client/utilities/package.json.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Jun 17, 2021
1 parent 020fa76 commit 56ecc6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion config/entryPoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ const entryPoints = [
{ dirs: ['react', 'hooks'] },
{ dirs: ['react', 'parser'] },
{ dirs: ['react', 'ssr'] },
{ dirs: ['utilities'] },
{ dirs: ['utilities'],
sideEffects: [
"./globals/**"
]},
{ dirs: ['testing'], extensions: [".js", ".jsx"] },
];

Expand Down
3 changes: 2 additions & 1 deletion config/prepareDist.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ fs.copyFileSync(`${srcDir}/LICENSE`, `${destDir}/LICENSE`);
entryPoints.forEach(function buildPackageJson({
dirs,
bundleName = dirs[dirs.length - 1],
sideEffects = false,
}) {
if (!dirs.length) return;
fs.writeFileSync(
Expand All @@ -71,7 +72,7 @@ entryPoints.forEach(function buildPackageJson({
main: `${bundleName}.cjs.js`,
module: 'index.js',
types: 'index.d.ts',
sideEffects: false,
sideEffects,
}, null, 2) + "\n",
);
});

0 comments on commit 56ecc6a

Please sign in to comment.