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

Parse error when referencing a partial using an alias with a @ or ~ symbol #185

Open
jefferyto opened this issue Jun 28, 2019 · 0 comments

Comments

@jefferyto
Copy link

jefferyto commented Jun 28, 2019

I've set up an alias with an @ symbol, but when I try to reference a partial with it, I get a parse error. I also get the same error if the alias has the ~ (tilde) symbol.

I've created a test case here: https://github.com/jefferyto/webpack-handlebars-loader-resolve-alias-test

This is the error message I get:

ERROR in ./book-listing.handlebars
Module build failed (from ./node_modules/handlebars-loader/index.js):
Error: Parse error on line 3:
...div>  {{#books}}{{>$@aliased/book}}{{/b
----------------------^
Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'
    at Parser.parseError (/home/jeff/Code/personal/handlebars-loader/handlebars-loader-resolve-alias-test/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:267:19)
    at Parser.parse (/home/jeff/Code/personal/handlebars-loader/handlebars-loader-resolve-alias-test/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:336:30)
    at HandlebarsEnvironment.parse (/home/jeff/Code/personal/handlebars-loader/handlebars-loader-resolve-alias-test/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js:46:43)
    at compile (/home/jeff/Code/personal/handlebars-loader/handlebars-loader-resolve-alias-test/node_modules/handlebars-loader/index.js:205:18)
    at Object.module.exports (/home/jeff/Code/personal/handlebars-loader/handlebars-loader-resolve-alias-test/node_modules/handlebars-loader/index.js:411:4)
 @ ./app.js 1:26-62
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