What exactly “config.assets.debug” setting does?

前端 未结 2 1527
暖寄归人
暖寄归人 2020-12-09 08:34

I have started development of simple rails application. After several hours work I have notices that somehow the deleted css is still applied to the web pages.

In o

2条回答
  •  余生分开走
    2020-12-09 08:56

    This option's effect is well described in this post, but I'll summarize it here as well. The value of changing config.assets.debug lies in a compromise between page load time in development and ease of debugging.

    Basically:

    config.assets.debug = true: assets are served individually, organized just as you see them in development. Preprocessed languages like SASS or CoffeeScript will still show up as their target languages (i.e., CSS and JS, respectively).

    config.assets.debug = false: assets are bundled into files like application.css and application.js. Error stack traces will likely not have the correct line number any more and it is harder to map those back to your original code.

提交回复
热议问题