- Performance evaluation. Without minification and gzip, you can't always make accurate decisions regarding filesize changes, or do reasonable network speed testing locally.
- Cache-busting. By compiling your files and saving them with unique names, you're removing the need to clear the browser cache when testing on mobile devices and in older IE.
- Catching bugs.
- This is rarer now than it used to be, but uglify has historically created occasional issues in IE8. Better to catch them locally than on integration.
- Running in production mode exposes problems related to explicit filenames, since a production deploy can change filenames and break related code.
Temporarily add these guys to your environments/development.rb
### TEMPORARY SETTINGS START HERE
# disables the default debug mode, which loads each JS dependency individually
config.assets.debug = false
# renames files with a unique cachebusting string.
# generally useful in local development, and can expose issues that could appear on production
config.assets.digest = true
# enable live compilation, so there's no need to run precompile
# this will slow down your pageloads when enabled
config.assets.compile = true
# enable gzip in development
config.middleware.insert_before ActionDispatch::Static, Rack::Deflater
# compression
config.assets.js_compressor = :uglifier
config.assets.css_compressor = :scss
- Debugging. Since the files are getting minified and concatenated, styles and behaviors become much harder to debug. It's possible that this issue could be resolved by generating source maps:
- Speed. Minifying all these files is definitely slower, which might take its toll during development.