You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm precompiling templates into a .js file and have set the amd: true option in the compiler so the generated file is wrapped in define(['handlebars'], function (Handlebars) {
However, having set a path in my require config like this:
I suspect that this is related to the default object that is exposed on the AMD modules but it's hard for me to say for certain without seeing the code that is failing. Can you create a jsfiddle or some other website that shows this error?
I'll see if I can put something together to illustrate the issue. Basically, after I posted this, I simply switched to the non-amd runtime and added a shim, and everything worked as expected without changing anything else at all. Until I get a repro together I'm happy to close the issue
I arrived to this issue because I am experiencing the same problem with 2.0.0-alpha2. After fiddling a lot, I found that the first line in my precompiled templates is a = a["default"];. Since a is already the Handlebars instance (I modified handlebars.runtime to be an AMD module), this line sets it to undefined.
I'm precompiling templates into a .js file and have set the amd: true option in the compiler so the generated file is wrapped in
define(['handlebars'], function (Handlebars) {
However, having set a path in my require config like this:
'handlebars': '../bower_components/handlebars/handlebars.runtime.amd'
I'm seeing the message
in the browser console. The error is thrown by the generated module. Why is handlebars undefined in my module?
The text was updated successfully, but these errors were encountered: