diff --git a/packages/compat/src/compat-adapters/@glimmer/tracking.ts b/packages/compat/src/compat-adapters/@glimmer/tracking.ts index 7ee031590..f62fcc136 100644 --- a/packages/compat/src/compat-adapters/@glimmer/tracking.ts +++ b/packages/compat/src/compat-adapters/@glimmer/tracking.ts @@ -12,25 +12,20 @@ import { outputFileSync, copyFileSync } from 'fs-extra'; reexport the things from ember that are needed. */ class RedirectToEmber extends Plugin { - private didBuild = false; - build() { - if (!this.didBuild) { - copyFileSync(join(this.inputPaths[0], 'package.json'), join(this.outputPath, 'package.json')); - outputFileSync( - join(this.outputPath, 'index.js'), - // Prior to ember-source 4.1, cached didn't exist - // using this way of importing from metal, cached will be undefined if pre 4.1 - `import * as metal from "@ember/-internals/metal"; -const { cached, tracked } = metal; -export { cached, tracked };` - ); - outputFileSync( - join(this.outputPath, 'primitives', 'cache.js'), - `export { createCache, getValue, isConst } from "@ember/-internals/metal";` - ); - this.didBuild = true; - } + copyFileSync(join(this.inputPaths[0], 'package.json'), join(this.outputPath, 'package.json')); + outputFileSync( + join(this.outputPath, 'index.js'), + // Prior to ember-source 4.1, cached didn't exist + // using this way of importing from metal, cached will be undefined if pre 4.1 + `import * as metal from "@ember/-internals/metal"; + const { cached, tracked } = metal; + export { cached, tracked };` + ); + outputFileSync( + join(this.outputPath, 'primitives', 'cache.js'), + `export { createCache, getValue, isConst } from "@ember/-internals/metal";` + ); } }