Skip to content

Commit

Permalink
Using bundled polyfill to significantly increase performance
Browse files Browse the repository at this point in the history
The individual requires for each file were the part that was sooooo slow.
  • Loading branch information
jridgewell committed May 9, 2020
1 parent 7b4ced2 commit 107155e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ function createContext() {

// Initialize the test context with the polyfill, and then freeze the global to prevent implicit
// global creation in tests, which could cause things to bleed between tests.
runModuleInTestContext("@babel/polyfill", __filename, context, moduleCache);
runModuleInTestContext(
"@babel/polyfill/dist/polyfill.min",
__filename,
context,
moduleCache,
);

// Populate the "babelHelpers" global with Babel's helper utilities.
runCacheableScriptInTestContext(
Expand Down

0 comments on commit 107155e

Please sign in to comment.