loader-runner icon indicating copy to clipboard operation
loader-runner copied to clipboard

Add a way to share data across loaders for a given resource

Open romaricpascal opened this issue 5 years ago • 0 comments

It would be great if there was a way to store some meta data related to the compiled resource across the whole stack of loaders.

I'm trying to parse front-matter early on to then use the collected values later for generating extra source a couple of loaders later. Unfortunately, the meta argument I pass through this.callback gets lost after the next loader.

Would you be open to having the loaderContext used to invoke each loader bear an extra property (resourceMeta?) where loaders could store metadata to keep during the run?

romaricpascal avatar May 04 '19 17:05 romaricpascal