File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ module.exports = {
223223
224224 options . presets = [
225225 shouldRunPresetEnv && this . _getPresetEnvPlugins ( addonProvidedConfig ) ,
226- ]
226+ ] . filter ( Boolean ) ;
227227
228228 if ( shouldCompileModules ) {
229229 options . moduleIds = true ;
Original file line number Diff line number Diff line change @@ -791,6 +791,24 @@ describe('ember-cli-babel', function() {
791791 expect ( result . plugins ) . to . deep . include ( plugin ) ;
792792 } ) ;
793793
794+ it ( 'sets `presets` to empty array if `disablePresetEnv` is true' , function ( ) {
795+ let options = {
796+ 'ember-cli-babel' : {
797+ disablePresetEnv : true ,
798+ }
799+ } ;
800+ this . addon . parent = {
801+ options : {
802+ babel6 : {
803+ plugins : [ { } ]
804+ } ,
805+ } ,
806+ } ;
807+
808+ let result = this . addon . buildBabelOptions ( options ) ;
809+ expect ( result . presets ) . to . deep . equal ( [ ] ) ;
810+ } ) ;
811+
794812 it ( 'user plugins are before preset-env plugins' , function ( ) {
795813 let plugin = function Plugin ( ) { } ;
796814 this . addon . parent = {
You can’t perform that action at this time.
0 commit comments