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

After live reload static images return 404 until reload dev server #171

Open
Poylar opened this issue Apr 19, 2023 · 4 comments
Open

After live reload static images return 404 until reload dev server #171

Poylar opened this issue Apr 19, 2023 · 4 comments
Labels
bug Something isn't working pinned Go away stale bot

Comments

@Poylar
Copy link

Poylar commented Apr 19, 2023

Environment
Node version: 18.14.2
simple-nunjucks-loader version: 3.2.0
webpack version: 5.79.0

If static assets are located inside the component that I include using include inside block 'content', then when changing and live reloading, my images return 404. At the same time, other assets that are outside the include (but inside the block, for example header.njk) work correctly .
I am attaching a repository with this issue.
To reproduce it, install all npm i dependencies, so npm run dev. You will see the hero slider, make any change in the source code and after a quick reload, the images from hero will disappear, but the logo image will remain.

Edit. I just found that it fixes if I manually resave the njk template

https://github.com/Poylar/nunjucks-tailwindcss-starter

@Poylar Poylar added the bug Something isn't working label Apr 19, 2023
@stale
Copy link

stale bot commented May 3, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 3, 2023
@stale stale bot closed this as completed May 18, 2023
@ogonkov ogonkov reopened this May 20, 2023
@stale stale bot removed the stale label May 20, 2023
@ogonkov
Copy link
Owner

ogonkov commented May 20, 2023

Hello @Poylar what i need to edit to reproduce the bug? hero.njk?

@Poylar
Copy link
Author

Poylar commented May 20, 2023

Hello @Poylar what i need to edit to reproduce the bug? hero.njk?

@ogonkov hi, i update repo. git pull to see changes
steps:

  1. npm i/npm run dev
  2. open hero njk and make sure you have image in views/components/hero.njk
  3. make sure you see image on website
  4. open App.ts and resave this file
  5. you will see that there is no picture

@stale
Copy link

stale bot commented Jun 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 9, 2023
@ogonkov ogonkov added pinned Go away stale bot and removed stale labels Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pinned Go away stale bot
Projects
None yet
Development

No branches or pull requests

2 participants