@@ -17,7 +17,10 @@ const defaultOptions = {
1717 browserifyOptions : {
1818 extensions : [ '.js' , '.jsx' , '.coffee' , '.cjsx' ] ,
1919 transform : [
20- [ require . resolve ( './cjsxify' ) , { } ] ,
20+ [
21+ require . resolve ( './cjsxify' ) ,
22+ { } ,
23+ ] ,
2124 [
2225 require . resolve ( 'babelify' ) ,
2326 {
@@ -27,9 +30,7 @@ const defaultOptions = {
2730 plugins : [ 'babel-plugin-add-module-exports' ] . map ( require . resolve ) ,
2831 // babel-preset-env supports any JS that's stage-4, meaning it's
2932 // completely finalized in the ECMA standard
30- presets : [ 'babel-preset-env' , 'babel-preset-react' ] . map (
31- require . resolve
32- ) ,
33+ presets : [ 'babel-preset-env' , 'babel-preset-react' ] . map ( require . resolve ) ,
3334 } ,
3435 ] ,
3536 ] ,
@@ -60,16 +61,8 @@ const preprocessor = (options = {}) => {
6061 log ( 'received user options' , options )
6162
6263 // allow user to override default options
63- const browserifyOptions = Object . assign (
64- { } ,
65- defaultOptions . browserifyOptions ,
66- options . browserifyOptions
67- )
68- const watchifyOptions = Object . assign (
69- { } ,
70- defaultOptions . watchifyOptions ,
71- options . watchifyOptions
72- )
64+ const browserifyOptions = Object . assign ( { } , defaultOptions . browserifyOptions , options . browserifyOptions )
65+ const watchifyOptions = Object . assign ( { } , defaultOptions . watchifyOptions , options . watchifyOptions )
7366
7467 // we return function that accepts the arguments provided by
7568 // the event 'file:preprocessor'
@@ -171,8 +164,8 @@ const preprocessor = (options = {}) => {
171164 } )
172165
173166 const bundlePromise = fs
174- . ensureDirAsync ( path . dirname ( outputPath ) )
175- . then ( bundle )
167+ . ensureDirAsync ( path . dirname ( outputPath ) )
168+ . then ( bundle )
176169
177170 // cache the bundle promise, so it can be returned if this function
178171 // is invoked again with the same filePath
0 commit comments