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

Dependencies inside 11ty.js JavaScript templates are cached and don’t apply changes #2838

Closed
zachleat opened this issue Mar 2, 2023 · 4 comments
Labels
bug: --serve restart Changes to projects shouldn’t need to restart dev server release: 2.x Stable version 2.x release

Comments

@zachleat
Copy link
Member

zachleat commented Mar 2, 2023

If you modify a dependency, it needs to delete the upstream template from this cache:

if (inputPath in this.instances) {

@zachleat zachleat added bug: --serve restart Changes to projects shouldn’t need to restart dev server release: 2.x Stable version 2.x release labels Mar 2, 2023
@zachleat
Copy link
Member Author

zachleat commented Mar 2, 2023

cc @whitep4nth3r

@zachleat zachleat added this to the Eleventy 2.0.1 milestone Mar 2, 2023
@zachleat
Copy link
Member Author

zachleat commented Mar 2, 2023

Also this isn’t clearing the upstream template require cache

this.watchTargets.clearRequireCacheFor(queue);

(Also confirmed changes in those two places were sufficient to apply changes to Salma’s project here)

@zachleat
Copy link
Member Author

zachleat commented Mar 2, 2023

Shipping with 2.0.1. You can npm install to the GitHub commit locally for now!

@zachleat
Copy link
Member Author

just fyi 2.0.1-alpha.2 has this as well

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 release: 2.x Stable version 2.x release
Projects
None yet
Development

No branches or pull requests

1 participant