Fix __webpack_public_path__ within getWorkerUrl method (#63)

Fix __webpack_public_path__ within getWorkerUrl method
This commit is contained in:
Alexandru Dima 2019-12-18 09:44:10 +01:00 committed by GitHub
commit f6a2196885
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,7 +117,7 @@ function createLoaderRules(languages, features, workers, outputPath, publicPath)
}
return {
getWorkerUrl: function (moduleId, label) {
var pathPrefix = (typeof window.__webpack_public_path__ === 'string' ? window.__webpack_public_path__ : ${JSON.stringify(publicPath)});
var pathPrefix = (typeof __webpack_public_path__ === 'string' ? __webpack_public_path__ : ${JSON.stringify(publicPath)});
return (pathPrefix ? stripTrailingSlash(pathPrefix) + '/' : '') + paths[label];
}
};