Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-05-04 19:50:14 +0300
committerMike Greiling <mike@pixelcog.com>2018-05-04 19:50:14 +0300
commitf2701f28b1b85d806a4bdcd9985ed53123b1d64d (patch)
tree724fe8d4548863ca5dbcabc443be5dc0e8bead06 /app/assets/javascripts/ide/index.js
parentd5e4c7201b4b3e884cd63206aba9d315ade1c709 (diff)
add better description for resetServiceWorkersPublicPath
Diffstat (limited to 'app/assets/javascripts/ide/index.js')
-rw-r--r--app/assets/javascripts/ide/index.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/ide/index.js b/app/assets/javascripts/ide/index.js
index 1119b572a1f..b8a611e3ae9 100644
--- a/app/assets/javascripts/ide/index.js
+++ b/app/assets/javascripts/ide/index.js
@@ -28,8 +28,11 @@ export function initIde(el) {
});
}
+// tell webpack to load assets from origin so that web workers don't break
export function resetServiceWorkersPublicPath() {
- // tell webpack to load assets from origin so that web workers don't break
+ // __webpack_public_path__ is a global variable that can be used to adjust
+ // the webpack publicPath setting at runtime.
+ // see: https://webpack.js.org/guides/public-path/
const relativeRootPath = (gon && gon.relative_url_root) || '';
const webpackAssetPath = `${relativeRootPath}/assets/webpack/`;
__webpack_public_path__ = webpackAssetPath; // eslint-disable-line camelcase