interlockjs / plugins

MIT License
2 stars 0 forks source link

Add second hash step to DCE'd modules #13

Open divmain opened 8 years ago

divmain commented 8 years ago

Since module hash is defined before all modules are loaded and processed, we'll need to either:

divmain commented 8 years ago

A good compromise solution may be to process and hash all modules and then, after all modules have been processed, do the require-replace. This will allow us to modify the hashes if necessary before the replace occurs, but it shouldn't add any significant processing time, and the structure of compilation would be mostly unchanged.

recursive require-replace --> map over all completed modules at the end to do require-replace

divmain commented 8 years ago

To disambiguate, rename existing function to updateModuleDependencies and a new function called updateAllDependencies.