Slow assets compilation in development mode

后端 未结 3 1254
庸人自扰
庸人自扰 2020-12-29 11:43

I have a large rails app with hundreds of coffee script files.

Sometimes when I make a tiny change in a coffeescript file or I switch the branch the whole assets are

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-29 12:28

    It's a sad truth, but you don't. There is not a clean way to solve this.

    However, there are some patterns you could follow to minimize your pain which if I understand correctly is having to wait a lot in development to see the changes.

    As said these have been seen here1 and here2.

    1. Take a look at item 2 from here1.
    2. Break your assets in many files. This will imply in fewer lines being processed when changes occur.
    3. Prefer css/js, they may not be as cool but require no compilation.
    4. Find something interesting to do while assets precompile. It may lower productivity but sure kills the pain.

提交回复
热议问题