11ty / eleventy

A simpler site generator. Transforms a directory of templates (of varying types) into HTML.
https://www.11ty.dev/
MIT License
16.84k stars 487 forks source link

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

Open cawa-93 opened 3 years ago

cawa-93 commented 3 years ago

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:

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

cawa-93 commented 3 years ago

Maybe duplicate of this https://github.com/11ty/eleventy/issues/1312

vuolen commented 1 year ago

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

dospunk commented 1 year ago

I'm also having this issue! Doesn't seem to be a duplicate of https://github.com/11ty/eleventy/issues/1312 since that one has been closed but this problem persists.

zachleat commented 2 months ago

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