mirror of https://github.com/webpack/webpack.git
fixed #1650
This commit is contained in:
parent
58623299f0
commit
684f02cbce
|
|
@ -29,7 +29,10 @@ module.exports = function() {
|
||||||
};
|
};
|
||||||
for(var name in $require$) {
|
for(var name in $require$) {
|
||||||
if(Object.prototype.hasOwnProperty.call($require$, name)) {
|
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) {
|
fn.e = function(chunkId) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
__webpack_public_path__ = "ok";
|
||||||
|
|
@ -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;
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue