Skip to content

Сouldn't get partials working well #12

@greebamax

Description

@greebamax

Hi, I'm trying to use your plugin to manage Handlebars templates, but I'm getting the following errors when trying to build my simple app.

src/main.js → build/main.js...
(!) Unresolved dependencies
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-external-dependency
_testPartial.html (imported by src/client/js/views/message.html)
_testCommonPartial.html (imported by src/client/js/views/message.html)
created build/main.js in 793ms

I followed your example but it doesn't work for me. You can see sample repo here.

  • _testPartial.html is a simple partial placed next to src/client/js/views/message.html
  • _testCommonPartial.html is a partial placed in src/common/views/ directory.

Even if I solve the problem of how the rollup resolves modules using relative paths (see below) I start getting an error on runtime.

<!-- src/index.html -->
<div>{{> './_testPartial' }}</div>
<div>{{> '/_testCommonPartial' }}</div>

Exceptions:

  "Error: The partial ./_testPartial could not be found  ...
  "Error: The partial ./_testCommonPartial could not be found  ...

Could you please help me with what I'm doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions