Disable asset precompilation function in Rails

I would like to disable the resource precompilation function in rails. I am working on an application where the user can download the code, and I would like to avoid changing the names of the css and js files in the downloaded html file, since the user can run index.html and see everything.

Here is the app: http://impress-builder.herokuapp.com/

+6
source share
2 answers

Take a look at the Piping Guide .

The asset console is enabled by default. You can disable it in config / application.rb by placing this line in the application class definition:

config.assets.enabled = false 
+10
source

Alternative approach

 config.assets.precompile 

It is an array of files to compile. Swap it with an empty array to avoid precompilation.

 # config/application.rb # ... config.assets.precompile = [] # ... 
+2
source

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


All Articles