jmreidy/grunt-browserify

Register plugins *before* transforms?

jvilk opened this issue · 4 comments

jvilk commented

I'm using tsify to compile TypeScript input to browserify. tsify exists as a plugin, since it uses the TypeScript compiler for dependency resolution. Because it does this, tsify must be registered with Browserify before any transforms. Unfortunately for me, Browserify runs all transforms before plugins!

My solution right now is to add a configure callback to manually invoke the API, but I wanted to open this issue to see if it would be a good idea to change grunt-browserify's behavior to register plugins before transforms. I'm relatively new to the Browserify ecosystem, so I don't know if the converse is ever true -- e.g. that a transform must be registered before all plugins. If it's not, then this behavior change would be benign. 😄

I'd like this too

quaos commented

I got this issue too with ES6 modules and esmify. When using browserify -p esmify directly there is no problem.

I got this issue too with ES6 modules and esmify. When using browserify -p esmify directly there is no problem.

I am experiencing the same problem. I cannot get browserify work together with tsify and esmify as plugins.