From f2701f28b1b85d806a4bdcd9985ed53123b1d64d Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Fri, 4 May 2018 11:50:14 -0500 Subject: add better description for resetServiceWorkersPublicPath --- app/assets/javascripts/ide/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/assets/javascripts/ide/index.js') 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 -- cgit v1.2.3