babel / babelify

Browserify transform for Babel
MIT License
1.68k stars 114 forks source link

now extensions could be used in an array when using browserify cli #298

Open mugeco opened 3 years ago

mugeco commented 3 years ago

Got a

if (extensions.indexOf(extname) === -1) { TypeError: extensions.indexOf is not a function

at babelify/index.js:75 when using Browserify CLI like this:

[ babelify --presets [ @babel/preset-env @babel/preset-react ] --extensions [ .tsx .js .ts ] --plugins [ @babel/plugin-proposal-class-properties @babel/transform-runtime] ]

My PR should fix it.