Closed vijoc closed 9 years ago
Actually I'm still having issues with integrating handlebars_assets
to my application. The issue is that the AMD modules are rendered in a very wonky way; the return value is a string containing the define([handlebars], ....
header and everything. Still investigating.
EDIT: Nevermind, the issue was with cached assets.
@vijoc I remember for hamlbars prior to v2 there were issues because of registering the same extension (e.g. hamlbars and handlbars_assets gem both would try to grab .hamlbars).
I would recommend configuring the handlebars_assets get (this gem); so that:
HandlebarsAssets.Config.configure do |config|
config.hamlbars_extensions = '.hamlbars_assets'
end
that way it will not conflict with hamlbars gem; tell me how it goes and I might add it to the readme.
Actually I resolved the issue by setting config.hamlbar_extensions = []
, which of course has the same effect in this case. As I poked around the codebase I found the option haml_enabled
but it doesn't seem to be used, at least not when deciding whether to use the haml engine or not. Maybe that could be used to tell handlebars_assets not to worry about .hamlbars
files by default?
@vijoc yup that is the other way to do it :) but basically the same effect.
I had some issues with a setup including
requirejs-rails
andhamlbars
. I first implemented this change locally in my app, but figured others might benefit from it. I'm not sure why this fixed the issue, but it did.