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

11ty.js layout with required scripts is not updating #1435

Closed
cawa-93 opened this issue Oct 5, 2020 · 6 comments
Closed

11ty.js layout with required scripts is not updating #1435

cawa-93 opened this issue Oct 5, 2020 · 6 comments
Labels
bug: --serve restart Changes to projects shouldn’t need to restart dev server template-language: javascript

Comments

@cawa-93
Copy link

cawa-93 commented Oct 5, 2020

Describe the bug
If you make changes in javascript files that are import by the required in layout, these changes are not displayed until the build process is restarted.

To Reproduce
Steps to reproduce the behavior:

  1. Clone repo
  2. Run npm i && npm start
  3. Open http://localhost:8080 and check text on web page
  4. Change _includes/test.11ty.js
  5. A message appears in the log that 11ty saw changes in the file and restarted build, but on the web page of these changes it is displayed even after the update. The only way to see these changes is to stop the server and restart it

Expected behavior
Changes in the files that are attached inside the template should result in a change in the resulting html. How it works if you change the file _includes/base.11ty.js directly.

Environment:

  • OS and Version: WIndows
  • Eleventy Version 0.11.0

Additional context
In a real project, such a connection is used to combine several small parts into one large template (Live code)

@cawa-93
Copy link
Author

cawa-93 commented Oct 7, 2020

Maybe duplicate of this #1312

@vuolen
Copy link

vuolen commented Jan 6, 2023

I tried this out but updated to version 2.0.0-canary.24, and the problem still persists.

@dospunk
Copy link

dospunk commented May 25, 2023

I'm also having this issue! Doesn't seem to be a duplicate of #1312 since that one has been closed but this problem persists.

@zachleat zachleat added bug: --serve restart Changes to projects shouldn’t need to restart dev server template-language: javascript labels Jul 10, 2024
@zachleat
Copy link
Member

This is almost certainly solved by the new dependency mapper in 3.0 but we can circle back after 3.0 has shipped

@zachleat zachleat added waiting-to-close Issue that is probably resolved, waiting on OP confirmation. and removed needs-triage labels Jul 10, 2024
@kkukshtel
Copy link

I'm on 11ty 3.0 right now and am seeing this exact issue still @zachleat . I'm also wondering if it's less 11ty fault and more about browser caching?

@zachleat zachleat removed the waiting-to-close Issue that is probably resolved, waiting on OP confirmation. label Oct 22, 2024
@zachleat
Copy link
Member

Confirmed that the provided test case works in v3.0.0 on Windows. If other folks on this issue are seeing a similar issue persist using v3.0.0, please open a new issue! If the original poster is still seeing this issue persist on v3.0.0—please add a comment here and we’ll reopen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: --serve restart Changes to projects shouldn’t need to restart dev server template-language: javascript
Projects
None yet
Development

No branches or pull requests

5 participants