componentjs / builder2.js

builder for component
50 stars 20 forks source link

execution order for builder plugins #74

Open timaschew opened 10 years ago

timaschew commented 10 years ago

I've created a minify plugin for the js and css output. It doesn't work for visionmedia/debug, because the require replacement is done after all plugins.

The origin source:

if ('undefined' == typeof window) {
  module.exports = require('./lib/debug');
} else {
  module.exports = require('visionmedia~debug@0.7.4/debug.js');
}

output:

module.exports=require("undefined"==typeof window?"./lib/debug":"./debug");

but in this case it would be better to do the minification for the whole output file not for each file. But I guess there are maybe some cases to use something for each file.

micky2be commented 9 years ago

Having similar problem when using uglify-js as a plugin