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

"templateContent" & Handlebars — Blueimp works simultaneously and parses {% %} #40

Closed
Stas404 opened this issue May 17, 2015 · 4 comments

Comments

@Stas404
Copy link

Stas404 commented May 17, 2015

webpack.config.js [plugins]:

new HtmlWebpackPlugin({
    templateContent: function(templateParams, webpackCompiler) {
        var hbs = require(path.resolve('./app/src/index.hbs'));
        return hbs(templateParams);
    }
})
@Stas404 Stas404 changed the title templateContent — missing helpers. templateContent — some notices. May 17, 2015
@Stas404 Stas404 changed the title templateContent — some notices. "templateContent" & Handlebars — Blueimp works simultaneously and parses {% %} May 17, 2015
@jantimon
Copy link
Owner

The webpack.config.js code is not executed in webpack context but in node context.
Because of that it's not possible to use webpack loaders for now.

There is work in progress for one of the future releases.

@Stas404
Copy link
Author

Stas404 commented May 18, 2015

jantimon, I'm afraid that you misunderstood me.
I would like to draw your attention to the fact that the Blueimp works in parallel with Handlebars in the "templateContent". Blueimp parses {% %} anyway.
I mean that Blueimp should not work when I use "templateContent" with another template engine.
The context is not to blame.
Thanks.

@jantimon
Copy link
Owner

I know - sorry I thought it was because handlebars didn't parse it correctly.
If you provided a templateContent string it might also be a template therefore it is also compiled with the blue imp template. #41 adds the new option compile which allows you turn of the blueImp compilation.

@lock
Copy link

lock bot commented Jun 1, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants