mediamonks / muban

A backend-agnostic framework to enhance server-rendered HTML using a modern webpack development setup.
https://mediamonks.github.io/muban/
39 stars 15 forks source link

'src' ancestor folder breaks component paths #65

Closed JoseMarcenaro closed 5 years ago

JoseMarcenaro commented 5 years ago

Hi there Thanks for the good work on this platform. It's amazing!

Small issue I noted: I'm using the current 'master' (commit d877c61d) of version 2.3.1+

On the generated HTML, I noted that all the component path comments were broken: i.e

    <!-- partial: muban/ -->
    <div data-component="app-root">

      <!-- partial: muban/ -->
      <div data-component="header">
        <ul>
          <li><a href="/home.html">Home</a></li>
          <li><a href="/about.html">About</a></li>
        </ul>
      </div>
      <!-- / muban/ -->

After some debugging I detected that this happened whenever there was a /src/ folder up in the hierarchy (above the muban folder). If I rename that 'src' folder as 'src1' the problem disappears.

The reason for using a src folder, in our case is that:

Of course we can change that in this specific case - no big deal - but I just wanted to point out the issue in case it matters to someone else.

NOTE: I'm running on a Windows platform

ThaNarie commented 5 years ago

Thanks for the report, I'll have a fix ready tomorrow which you can apply by updating the muban-core dependancy in your existing project.

ThaNarie commented 5 years ago

@JoseMarcenaro could you add muban-core@1.10.0 in your project, and let me know if that fixes the problem?

JoseMarcenaro commented 5 years ago

@ThaNarie - yes it does. Thanks!

ThaNarie commented 5 years ago

Awesome!