This commit is contained in:
Tobias Koppers 2016-02-04 08:49:08 +01:00
parent 58623299f0
commit 684f02cbce
3 changed files with 11 additions and 1 deletions

View File

@ -29,7 +29,10 @@ module.exports = function() {
};
for(var name in $require$) {
if(Object.prototype.hasOwnProperty.call($require$, name)) {
fn[name] = $require$[name];
Object.defineProperty(fn, name, {
get: function() { return $require$[name]; },
set: function(value) { $require$[name] = value; }
});
}
}
fn.e = function(chunkId) {

View File

@ -0,0 +1 @@
__webpack_public_path__ = "ok";

View File

@ -0,0 +1,6 @@
it("should be able to set the public path globally", function() {
var org = __webpack_public_path__;
require("./file");
__webpack_public_path__.should.be.eql("ok");
__webpack_public_path__ = org;
});