Skip to content

Commit

Permalink
Use Rack::Deflater in Opal::Server
Browse files Browse the repository at this point in the history
Makes running specs remotely a lot faster when your final output is 2M
of compiled JavaScript.

Also backwards compatible since it doesn't compress unless it's asked
to.
  • Loading branch information
meh committed Jan 20, 2014
1 parent 1fb1d45 commit 79e61db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/opal/sprockets/server.rb
Expand Up @@ -91,6 +91,7 @@ def create_app
@app = Rack::Builder.app do
not_found = lambda { |env| [404, {}, []] }

use Rack::Deflater
use Rack::ShowExceptions
map('/assets') { run sprockets }
map(server.source_maps.prefix) { run server.source_maps } if server.source_map_enabled
Expand Down

0 comments on commit 79e61db

Please sign in to comment.