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

Nested views does not trigger live reload #25

Open
kino90 opened this issue Apr 17, 2018 · 2 comments
Open

Nested views does not trigger live reload #25

kino90 opened this issue Apr 17, 2018 · 2 comments

Comments

@kino90
Copy link
Member

kino90 commented Apr 17, 2018

Found this some time ago, didn't have the time to look into.

At the moment we watch all the njk or html files into /views and into the folders inside it (e.g. partials and templates). But when creating a subfolder it won't watch the nested files.

a quick example of what I mean:

  views/
  -  partials/_my-partial.njk -> OK
  -  partials/about/_about-partial.njk --> FAIL won't trigger reload
  -  index.njk -> OK

It surely is an issue with the path at this line but I don't know the cleanest way to fix it (without possibly breaking any case!)

@dwightjack
Copy link
Member

I think that was by design to attach fewer watcher as possible.
Maybe it was a performance issue in some earlier versions and ot has been kept for compatibility reasons.

Anyway I think it's fine to replace it with a recurse glob path like ${viewPath}/**/${viewmatch}

Remember to update the next glob as well.

@kino90
Copy link
Member Author

kino90 commented Apr 18, 2018

Thanks! I'll look into it!

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

2 participants