1

I'm trying to find an Express Middleware for Uglify, can you recommend one? It seems like uglify-js-middleware is trying to solve it to Connect, but it seems like it's not maintained anymore and when I tried it, it didn't with Express.

Guy Korland
  • 7,479
  • 12
  • 48
  • 94
  • Connect middleware should be fully supported in express, as Express is a superset of Connect. What was the problem you experienced when you tried it in Express? – ExxKA Mar 13 '13 at 11:37
  • Have you looked at Grunt? You could uglify, concatenate, and validate JavaScripts files with it. It wouldn't be done on the fly as you are asking, though. – Hector Correa Mar 13 '13 at 14:13

3 Answers3

1

You should try these packages :

  1. express-uglify
  2. js-middleware
user568109
  • 43,824
  • 15
  • 87
  • 118
1

I'm using a middleware that I forked based on the less-middleware. I preferred the approach and setup better compared to some of the other options.

902 Labs - express-uglify-middleware on GitHub

user169251
  • 39
  • 2
  • 6
1

I think in these days we use

https://github.com/breeswish/express-minify

which does uglify automagically. But beware ... it still does not support ES6

zevero
  • 1,834
  • 18
  • 11