Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Enable dependency-aware (re-)loading of marko templates #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stephenbrady
Copy link
Contributor

Resolves #1

src/index.js Outdated
@@ -18,6 +18,20 @@ module.exports = function(source) {
writeToDisk: false
});

this.clearDependencies();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With further testing, clearDependencies() is probably too aggressive. One regression is that styles in the marko file no longer reload. Unfortunately, I'm not sure at the moment whether there is more fine-grained control in Webpack to control changes in dependencies other than to wipe and re-add them all. I will test further with clearDependencies() removed.

@stephenbrady stephenbrady force-pushed the dependency-reloading branch from 50f824f to 1c11a3d Compare April 24, 2017 21:13
- Marko templates can be dependent on other Marko templates via include, tag name reference, etc.
- Tell Webpack about these dependencies so that changes in a parent template causes Webpack to reload (and recompile) all child templates
@stephenbrady stephenbrady force-pushed the dependency-reloading branch from 1c11a3d to 64a0cb5 Compare May 6, 2017 02:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant