Skip to content

Commit

Permalink
fix treeshake issue
Browse files Browse the repository at this point in the history
  • Loading branch information
alicewriteswrongs committed Sep 28, 2023
1 parent ed4306f commit 6f915a3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/esbuild/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export function getEsbuildAliases(opts: BuildOptions): Record<string, string> {
/**
* Node modules which should be universally marked as external
*
* Note that we should not rely on this to mark node.js built-in modules as
* external. Doing so will override esbuild's automatic marking of those modules
* as side-effect-free, which allows imports from them to be properly
* tree-shaked.
*/
const externalNodeModules = [
'@jest/core',
Expand All @@ -46,9 +50,7 @@ const externalNodeModules = [
'child_process',
'console',
'constants',
'crypto',
'expect',
'fs',
'fsevents',
'inspector',
'jest',
Expand All @@ -58,9 +60,6 @@ const externalNodeModules = [
'jest-pnp-resolver',
'jest-runner',
'net',
'os',
'path',
'process',
'puppeteer',
'puppeteer-core',
'readline',
Expand Down

0 comments on commit 6f915a3

Please sign in to comment.