This repository has been archived by the owner on Jun 12, 2019. It is now read-only.
Releases: c-dante/proxy-loader
Releases · c-dante/proxy-loader
Injection Bugfix
Split Join Injection
Previously, the module would be injected by using String.replace
. This function treats $
as a special character. To avoid injection problems, I'm now using split
and join
to build the injected string.
Delayed cached module calls
Instead of setting the factory cache to an object of modules, it is now an object of getters.
The benefit is when building mock modules, it will no longer attempt to load all modules. Just the ones that are not mocked.
var cache = {
'module-name': function(){ return require('module-name'); },
...
}
Webpack will replace that inner require with the reference to __webpack_require__
.
First Publish
Example works well enough. Waiting for people to submit edge cases.