Rails 3 Asset Pipeline - don't compress specific javascript files

The precompilation of my asset failed due to a single javascript file (ckeditor.js), which is already compressed, and uglifier cannot parse it.

Since there is no real point to compress it twice, I would like to force uglifier to ignore this file (all the others work fine).

One solution I can come up with is to simply move it to / public and reference it from there, but that would also mean that I skipped gzip compression and the fingerprint for precompilation for me.

My configuration in case you are wondering:

# Asset precompilation config.assets.digest = true config.assets.compress = true config.assets.compile = false config.assets.precompile += %w{apple.css libs/modernizr-2.5.3.min.js admin/ckeditor.js} config.assets.css_compressor = :yui 

I am using Rails 3.2

+6
source share
1 answer

Just put it uncompressed and the extender will complete the task for all files

-1
source

Source: https://habr.com/ru/post/917449/


All Articles