Skip to content

Commit

Permalink
chore: build babel-polyfill-dist on make watch
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Aug 11, 2020
1 parent df9ee2c commit 39aabeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -75,8 +75,8 @@ build-no-bundle: clean clean-lib
BABEL_ENV=development $(YARN) gulp build-no-bundle
# Ensure that build artifacts for types are created during local
# development too.
$(MAKE) generate-type-helpers
$(MAKE) build-typings
# Babel-transform-fixture-test-runner requires minified polyfill for performance
$(MAKE) generate-type-helpers build-typings build-polyfill-dist

build-no-bundle-ci: bootstrap-only
$(MAKE) build-no-bundle
Expand Down
Expand Up @@ -18,6 +18,7 @@ import QuickLRU from "quick-lru";

import diff from "jest-diff";

const babelPolyfillPath = resolve.sync("@babel/polyfill/dist/polyfill.min.js");
const cachedScripts = new QuickLRU({ maxSize: 10 });
const contextModuleCache = new WeakMap();
const sharedTestContext = createContext();
Expand All @@ -38,12 +39,7 @@ 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/dist/polyfill.min",
__filename,
context,
moduleCache,
);
runModuleInTestContext(babelPolyfillPath, __filename, context, moduleCache);

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

0 comments on commit 39aabeb

Please sign in to comment.