Skip to content

Commit 52aeda5

Browse files
committed
[ci] Reduce non-deterministic builds for eslint-plugin-react-hooks
See rollup/plugins#1425 Currently, `@babel/helper-string-parser/lib/index.js` is either emitted as a wrapped esmodule or inline depending on the ordering of async functions in `rollup/commonjs`. Specifically, `@babel/types/lib/definitions/core.js` is cyclic (i.e. transitively depends upon itself), but sometimes `@babel/helper-string-parser/lib/index.js` is emitted before this is realized. A relatively straightforward patch is to wrap all modules (see rollup/plugins#1425 (comment))
1 parent 693803a commit 52aeda5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/rollup/build.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,8 @@ function getPlugins(
393393
};
394394
},
395395
},
396-
bundle.tsconfig != null ? commonjs() : false,
396+
// See https://github.com/rollup/plugins/issues/1425
397+
bundle.tsconfig != null ? commonjs({strictRequires: true}) : false,
397398
// Shim any modules that need forking in this environment.
398399
useForks(forks),
399400
// Ensure we don't try to bundle any fbjs modules.

0 commit comments

Comments
 (0)