Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible requirejs.config({ enforceDefine: true}) issue with > hbs 0.10.0 #225

Open
ttocco opened this issue Feb 23, 2015 · 1 comment
Open

Comments

@ttocco
Copy link

ttocco commented Feb 23, 2015

While attempting to upgrade from version 0.4.0 to 0.11.2 I noticed that all of my hbs templates are suddenly throwing the following errors in the console:

Uncaught Error: No define call for views/GlobalNavigationTemplate
http://requirejs.org/docs/errors.html#nodefine

Backing down the version to 0.10.0 removes the errors. I suspect that this has something to do with the requirejs config option enforceDefine = true because setting this to false also removes the errors in version 0.11.2.

@ttocco
Copy link
Author

ttocco commented Apr 1, 2015

I haven't reverse engineered why this fix works for the above problem but if you take hbs.js line 571 from #0.10.0 :

var tmplName = config.isBuild ? '' : "'" + name + "',";

and overwrite hbs.js line 579 from #0.11.2 :

var tmplName = "'hbs!" + name + "',";

The template name problem appears to go away if you need to use requirejs.config({enforceDefine: true}) with requirejs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant