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

Helper paths being overwritten #233

Open
benwalsh opened this issue May 28, 2015 · 1 comment
Open

Helper paths being overwritten #233

benwalsh opened this issue May 28, 2015 · 1 comment

Comments

@benwalsh
Copy link

I am using requirejs-rails but I think the issue is not there, but here.

I have my Javascript app in a /app/assets/javascripts/fn/* directory. Handlebars is loading, the require-handlebars-plugin is loading, and my hbs templates are loading. But then the moduleTree encounters a helper, and it blows up:

{ [Error: Error: ENOENT, no such file or directory '/var/rails/myapp/releases/20150528174835/tmp/requirejs/dst/templates/helpers/t.js'
In module tree:
    some-file
      some-dependency
        hbs

But the file is not located at templates/helpers/t.js, it's located at fn/templates/helpers/t.js. I have even abstracted the direct call out; the JS file is including hbs-translation-helper, and in the requireJS config, that path is resolving to: "fn/templates/helpers/t". So why would it be looking in a top-level templates/ directory which isn't there?

I have tried setting:

hbs:
  helpers: false

but no luck.

@chrisrink
Copy link

It defaults to templates/helpers but can be overwritten with requirejs.config.hbs.helperDirectory

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

2 participants