Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browserify - order of transforms/plugins

In browserify, can you explicitly set the order in which transforms and plugins run? If so, how do you do it in package.json config and in the browserify API?

Specifically, I'd like to use aliasify and tsify together and to that end, aliasify has to run first. How would you go about doing this?

If it isn't possible, how is the order determined?

like image 863
Vladimir Rovensky Avatar asked May 13 '26 15:05

Vladimir Rovensky


1 Answers

You can find many information In that browserify-handbook

This screenshot is one of them you find.

enter image description here

--- I added a answer below for a question in comment.

@VladimirRovensky, the plugins are registered to the browserify instance directly, so there is register order.

var browserify = require('browserify');
var b = browserify();
b.plugin( firstPlugin, firstPluginOpts );
b.plugin( secondPlugin, secondPluginOpts );

after that, each plugin operate as their defined, by listening for events or splicing transforms into the pipeline.

It is hard to understand plugin's order as with transform's order.

like image 169
aluc Avatar answered May 16 '26 04:05

aluc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!