diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-05-04 11:50:14 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-05-04 11:50:14 -0500 |
commit | f2701f28b1b85d806a4bdcd9985ed53123b1d64d (patch) | |
tree | 724fe8d4548863ca5dbcabc443be5dc0e8bead06 | |
parent | d5e4c7201b4b3e884cd63206aba9d315ade1c709 (diff) | |
download | gitlab-ce-f2701f28b1b85d806a4bdcd9985ed53123b1d64d.tar.gz |
add better description for resetServiceWorkersPublicPath
-rw-r--r-- | app/assets/javascripts/ide/index.js | 5 |
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 |