This repository was archived by the owner on Feb 6, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,19 @@ module.exports = {
7878 parallelConfig
7979 }
8080 } ;
81- // parallelBabelInfo will not be used in the cache unless it is explicitly included
82- let cacheKey = AstPlugins . makeCacheKey ( templateCompilerPath , pluginInfo , JSON . stringify ( parallelBabelInfo ) ) ;
81+
82+ let cacheKey ;
8383 babelPlugins . push ( {
8484 _parallelBabel : parallelBabelInfo ,
8585 baseDir : ( ) => __dirname ,
86- cacheKey : ( ) => cacheKey ,
86+ cacheKey : ( ) => {
87+ if ( cacheKey === undefined ) {
88+ // parallelBabelInfo will not be used in the cache unless it is explicitly included
89+ cacheKey = AstPlugins . makeCacheKey ( templateCompilerPath , pluginInfo , JSON . stringify ( parallelBabelInfo ) ) ;
90+ }
91+
92+ return cacheKey ;
93+ } ,
8794 } ) ;
8895 }
8996 else {
Original file line number Diff line number Diff line change @@ -53,15 +53,21 @@ module.exports = {
5353 global . EmberENV = clonedEmberENV ;
5454
5555 let Compiler = require ( templateCompilerPath ) ;
56- let cacheKey = this . makeCacheKey ( templateCompilerPath , pluginInfo ) ;
56+ let cacheKey ;
5757
5858 let precompileInlineHTMLBarsPlugin ;
5959
6060 pluginInfo . plugins . forEach ( ( plugin ) => Compiler . registerPlugin ( 'ast' , plugin ) ) ;
6161
6262 let precompile = Compiler . precompile ;
6363 precompile . baseDir = ( ) => path . resolve ( __dirname , '..' ) ;
64- precompile . cacheKey = ( ) => cacheKey ;
64+ precompile . cacheKey = ( ) => {
65+ if ( cacheKey === undefined ) {
66+ cacheKey = this . makeCacheKey ( templateCompilerPath , pluginInfo ) ;
67+ }
68+
69+ return cacheKey ;
70+ } ;
6571
6672 let modulePaths = [ 'ember-cli-htmlbars-inline-precompile' , 'htmlbars-inline-precompile' ] ;
6773 precompileInlineHTMLBarsPlugin = [ HTMLBarsInlinePrecompilePlugin , { precompile, modulePaths } ] ;
You can’t perform that action at this time.
0 commit comments