mirror of https://github.com/webpack/webpack.git
fix: support web workers loading for jsonp format
This commit is contained in:
parent
b6c781a0f1
commit
11144e4eec
|
@ -69,7 +69,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
||||||
if (options && options.baseUri) {
|
if (options && options.baseUri) {
|
||||||
return `${RuntimeGlobals.baseURI} = ${JSON.stringify(options.baseUri)};`;
|
return `${RuntimeGlobals.baseURI} = ${JSON.stringify(options.baseUri)};`;
|
||||||
}
|
}
|
||||||
return `${RuntimeGlobals.baseURI} = (document && document.baseURI) || self.location.href;`;
|
return `${RuntimeGlobals.baseURI} = (typeof document !== 'undefined' && document.baseURI) || self.location.href;`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue