require-handlebars-plugin icon indicating copy to clipboard operation
require-handlebars-plugin copied to clipboard

Duplicate Failed @hbs Includes

Open machineghost opened this issue 11 years ago • 3 comments

I've been using (and loving) the require-handlebars-plugin since I first heard you mention it at jQueryConf. However, I've run in to a problem with the latest version: when I use it, all of my templates get loaded normally:

GET /assets/js/search/templates/queryListRow.handlebars 200 ok

but then the same template file tries to load (and fails) at an invalid address:

"NetworkError: 404 NOT FOUND - /assets/js/search/templates/[email protected]"

Now, I have a "template" path that maps to "ext/require/hbs', and my hbs config has a templateExtension of "handlebars", so that came from a define["template!search/templates/queryListRow'] call ... but I'm not sure how any of that would matter.

I've tried changing customNameExtension = "@hbs", to customNameExtension = "hbs", in hbs.js (as that was the only place I could find "@hbs"), but that didn't seem to help. Any thoughts on what I might be doing wrong?

machineghost avatar Oct 22 '12 17:10 machineghost

I had almost similar behavior until I upgraded my Require.js to 2.1.1 as stated in af2d6caf94558b3ffff750c01f923a9cebbef74b

You of course also need to have the latest plugin HEAD.

nnarhinen avatar Oct 23 '12 20:10 nnarhinen

@machineghost can you confirm that 2.1.1 works for you? It works for me. If it does work for you, I'll update the docs to support 2.1.1+.

SlexAxton avatar Oct 24 '12 06:10 SlexAxton

Sorry for the late reply, been busy with other stuff; 2.1.1 does work for me, thanks.

machineghost avatar Oct 26 '12 05:10 machineghost