Webpack property __webpack_public_path__ must be a free var

This commit is contained in:
Mike Greiling 2019-03-13 09:54:45 -05:00
parent 1d1473de8e
commit 4273b13ac4
No known key found for this signature in database
GPG key ID: 0303DF507FA67596

View file

@ -117,7 +117,7 @@ function createLoaderRules(languages, features, workers, outputPath, publicPath)
} }
return { return {
getWorkerUrl: function (moduleId, label) { 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]; return (pathPrefix ? stripTrailingSlash(pathPrefix) + '/' : '') + paths[label];
} }
}; };