kadirahq / fast-render

Render you app even before the DDP connection is live. - magic?
MIT License
560 stars 80 forks source link

.onAllRoutes() runs publish for all .js, .css,....any route #111

Closed mikowals closed 9 years ago

mikowals commented 9 years ago

Long time user of fast-render and just noticed that version 2.3.2 was calling publish dozens of times running in devel, and several times in production. I think onAllRoutes() is being very literal and calls the same publish for every file requested by the client rather than just once for the single .html file served on any route to a meteor app. Reproduction of issue here.

This means that null publish functions can no longer be used with fast-render because they will always be called many times. Naming all publish functions and then excluding .js, .css, .woff, ...etc. by checking the path inside onAllRoutes() is a workaround.

Possibly related to other issues #108, #104, #106.

arunoda commented 9 years ago

Okay. This is something good. I think I can do something. Thanks.

arunoda commented 9 years ago

I fixed this issue with https://github.com/meteorhacks/fast-render/commit/9203dcb9baa0790d9da3311c677e496c54e25d58

Released as 2.4.0

mikowals commented 9 years ago

Yep, problem appears fixed. Thanks.