{"issue":{"state":"closed","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/d084e44bfe1566d87abf80d1f6c0b8a4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"d084e44bfe1566d87abf80d1f6c0b8a4","url":"https://api.github.com/users/johnnywengluu","login":"johnnywengluu","id":445841},"milestone":null,"labels":[],"assignee":null,"updated_at":"2011-10-29T20:39:35Z","comments":1,"closed_at":"2011-10-29T20:39:35Z","url":"https://api.github.com/repos/TrevorBurnham/connect-assets/issues/34","body":"I am using ExtJS 4 and there is a problem with the new loading approach.\r\n\r\nAtm I have to call js() from within my html templates but when using ExtJS the files are loaded dynamically from the browser.\r\n\r\nThat is their are actually making an Ajax request to my coffeescript files eg. \"/app/controller/MyController.js\" but now it can't find it since I didn't use js() in the HTML template.\r\n\r\n- Isn't there a way to skip js() method at least when I am in development mode since ExtJS is just dynamically loading files in development mode too? In production mode it will have one big JS file compiled. Or else I have to have a list of 100+ files and keep it up to date when I remove usage in my app. It's a real headache and would force me to find another solution than connect-assets :(\r\n\r\n- Would the performance be worse?","html_url":"https://github.com/TrevorBurnham/connect-assets/issues/34","number":34,"title":"Dynamically loading coffeescript files from the frontend","id":2086126,"created_at":"2011-10-29T07:14:41Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/34a9fc8f846a8645cf4df511e8ec2c49?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"34a9fc8f846a8645cf4df511e8ec2c49","url":"https://api.github.com/users/TrevorBurnham","login":"TrevorBurnham","id":224895},"updated_at":"2011-10-29T20:39:35Z","url":"https://api.github.com/repos/TrevorBurnham/connect-assets/issues/comments/2566859","body":"If you want your assets to be available directly whether or not you've cached them with connect-assets, you should use the static middleware separately, e.g.\r\n\r\n    app.use assets src: 'assets'\r\n    app.use express.static 'assets'\r\n\r\nYou could even configure the static middleware only if you're in development mode.\r\n\r\nWhether performance will be better or worse is a complex question. Most sites just concatenate everything together, which generally means a slow first page load, but everything is fast from that point on (until the user switches browsers, or their cache expires, or you change something and redeploy your JS). For sites with a large amount of JS that users don't need right away, though, asynchronous loading can make a huge difference—especially with slower connections and/or slower browsers (mobile devices generally having both).","id":2566859,"created_at":"2011-10-29T20:39:35Z"}}