@@ -135,7 +135,7 @@ dBabelVersion: ${hasValidBabelVersion};`
135135
136136 // add the babel-plugin-htmlbars-inline-precompile to the list of plugins
137137 // used by `ember-cli-babel` addon
138- if ( ! this . _isInlinePrecompileBabelPluginRegistered ( babelPlugins ) ) {
138+ if ( ! utils . isInlinePrecompileBabelPluginRegistered ( babelPlugins ) ) {
139139 let pluginInfo = this . astPlugins ( ) ;
140140 let templateCompilerPath = this . templateCompilerPath ( ) ;
141141
@@ -194,41 +194,6 @@ dBabelVersion: ${hasValidBabelVersion};`
194194 }
195195 } ,
196196
197- /**
198- * This function checks if 'babel-plugin-htmlbars-inline-precompile' is already present in babelPlugins.
199- * The plugin object will be different for non parallel API and parallel API.
200- * For parallel api, check the `baseDir` of a plugin to see if it has current dirname
201- * For non parallel api, check the 'modules' to see if it contains the babel plugin
202- * @param {* } plugins
203- */
204- _isInlinePrecompileBabelPluginRegistered ( plugins ) {
205- return plugins . some ( plugin => {
206- if ( Array . isArray ( plugin ) ) {
207- let [ pluginPathOrInstance , options ] = plugin ;
208-
209- return (
210- pluginPathOrInstance === require . resolve ( 'babel-plugin-htmlbars-inline-precompile' ) &&
211- typeof options . modules === 'object' &&
212- options . modules [ 'ember-cli-htmlbars' ] === 'hbs'
213- ) ;
214- } else if (
215- plugin !== null &&
216- typeof plugin === 'object' &&
217- plugin . _parallelBabel !== undefined
218- ) {
219- return (
220- plugin . _parallelBabel . requireFile ===
221- path . resolve ( __dirname , 'lib/require-from-worker' ) &&
222- typeof plugin . _parallelBabel . params === 'object' &&
223- typeof plugin . _parallelBabel . params . modules === 'object' &&
224- plugin . _parallelBabel . params . modules [ 'ember-cli-htmlbars' ] === 'hbs'
225- ) ;
226- } else {
227- return false ;
228- }
229- } ) ;
230- } ,
231-
232197 projectConfig ( ) {
233198 return this . project . config ( process . env . EMBER_ENV ) ;
234199 } ,
0 commit comments