gobblejs / gobble

The last build tool you'll ever need
333 stars 20 forks source link

Default with accept with regex doesn't transform to .ext #97

Closed martypdx closed 8 years ago

martypdx commented 8 years ago

Bit of an edge case, but given file transformer defaults like:

someTransformer.defaults = {
    accept: /\..*/,
    ext: '.js'
};

Output won't get mapped correctly because this line:

const destname = ( options.ext && ~options.accept.indexOf( ext ) ) ? ...  : ... ;

is doing an indexOf check so regex fails

Rich-Harris commented 8 years ago

fixed in 0.11.3 👍