From 6b9f746073492a24e08f5e61268381fd3a34065f Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Tue, 30 Mar 2021 19:21:58 -0700 Subject: [PATCH] Use backwards compatible fromPairs over fromEntries for node 10 support --- packages/compat/src/v1-addon.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/compat/src/v1-addon.ts b/packages/compat/src/v1-addon.ts index 37c9d8a7e..75eae5ef8 100644 --- a/packages/compat/src/v1-addon.ts +++ b/packages/compat/src/v1-addon.ts @@ -25,6 +25,7 @@ import SynthesizeTemplateOnlyComponents from './synthesize-template-only-compone import { isEmberAutoImportDynamic, isCompactReexports, isColocationPlugin } from './detect-babel-plugins'; import { ResolvedDep } from '@embroider/core/src/resolver'; import TemplateCompilerBroccoliPlugin from './template-compiler-broccoli-plugin'; +import { fromPairs } from 'lodash'; const stockTreeNames = Object.freeze([ 'addon', @@ -797,9 +798,7 @@ export default class V1Addon { return new ObserveTree(tree, (outputPath: string) => { let dir = join(outputPath, localDir); if (existsSync(dir)) { - files = Object.fromEntries( - walkSync(dir, { globs: ['**/*.js', '**/*.hbs'] }).map(f => [`./${f}`, `./${localDir}/${f}`]) - ); + files = fromPairs(walkSync(dir, { globs: ['**/*.js', '**/*.hbs'] }).map(f => [`./${f}`, `./${localDir}/${f}`])); } else { files = undefined; }