File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -91,13 +91,25 @@ module.exports = function (source, map) {
9191 if ( map && map . mappings ) opts . map . prev = map ;
9292
9393 if ( params . syntax ) {
94- opts . syntax = require ( params . syntax ) ;
94+ if ( typeof params . syntax === 'string' ) {
95+ opts . syntax = require ( params . syntax ) ;
96+ } else {
97+ opts . syntax = params . syntax ;
98+ }
9599 }
96100 if ( params . parser ) {
97- opts . parser = require ( params . parser ) ;
101+ if ( typeof params . parser === 'string' ) {
102+ opts . parser = require ( params . parser ) ;
103+ } else {
104+ opts . parser = params . parser ;
105+ }
98106 }
99107 if ( params . stringifier ) {
100- opts . stringifier = require ( params . stringifier ) ;
108+ if ( typeof params . stringifier === 'string' ) {
109+ opts . stringifier = require ( params . stringifier ) ;
110+ } else {
111+ opts . stringifier = params . stringifier ;
112+ }
101113 }
102114
103115 var exec = params . exec || config . exec ;
You can’t perform that action at this time.
0 commit comments