webpack-contrib / transform-loader

transform loader for webpack
MIT License
110 stars 23 forks source link

add support for passing options to the transformer #8

Closed phated closed 7 years ago

phated commented 9 years ago

I've been working with brfs and found that it only statically analyzes a few types of dynamic paths (mostly related to path.join and __dirname). However, you can pass an options object as the 2nd parameter and give it a vars key that maps your variables to paths. This PR adds the ability to define the options object as part of the loader query. I've tried my best to match your style based on imports-loader.

sokra commented 9 years ago

why the => syntax? whats the difference to =?

phated commented 9 years ago

There's no difference. I just figured this would keep the syntax consistent with loaders like imports-loader

AlbertoElias commented 9 years ago

Interested in knowing if this will be merged :)

jobevers commented 8 years ago

This would be nice to have.

For example, envify has purge functionality only available via an option.

niksy commented 7 years ago

What’s the status of this PR? Can it be merged? What can we do to help to get it merged?

michael-ciniawsky commented 7 years ago

@phated Sry it's been a while, could you please close and reopen the PR to trigger th CLA Bot again, sign the CLA and rebase against current master? 😛

phated commented 7 years ago

I no longer use this. Maybe someone else can pick it up