Handlebars-loader with inline partials

247 views Asked by At

Seems like handlebars-loader doesn't handle inline partials as I expected. I want you use them in the same way as {{> @partial-block}}. Lets say we have index.hbs

{{#>wrapper}}
    {{#*inline "column1"}}
        This is test for col 1
    {{/inline}}
    {{#*inline "column2"}}
        This is test for col 2
    {{/inline}}
{{/wrapper}}
{{#>wrapper}}
    {{#*inline "column1"}}
        This is another test for col 1
    {{/inline}}
    {{#*inline "column2"}}
        This is another test for col 2
    {{/inline}}
{{/wrapper}}

and wrapper.hbs partial

<div class="wrapper">
    <div class="column1">
        {{> column1}}
    </div>
    <div class="column2">
        {{> column2}}
    </div>
</div>

I expect

<div class="wrapper">
    <div class="column1">
        <div class="one">
            This is test for col 1
        </div>
    </div>
    <div class="column2">
            This is test for col 2
    </div>
</div>
<div class="wrapper">
    <div class="column1">
            This is another test for col 1
    </div>
    <div class="column2">
            This is another test for col 2
    </div>
</div>

But unfortunately loader doesn't handle {{> column1}} as inline partial but tries to load a file and obviously fails. Can somebody advise? Maybe I want too much...

0

There are 0 answers