Commit f2701f28 authored by Mike Greiling's avatar Mike Greiling

add better description for resetServiceWorkersPublicPath

parent d5e4c720
...@@ -28,8 +28,11 @@ export function initIde(el) { ...@@ -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() { 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 relativeRootPath = (gon && gon.relative_url_root) || '';
const webpackAssetPath = `${relativeRootPath}/assets/webpack/`; const webpackAssetPath = `${relativeRootPath}/assets/webpack/`;
__webpack_public_path__ = webpackAssetPath; // eslint-disable-line camelcase __webpack_public_path__ = webpackAssetPath; // eslint-disable-line camelcase
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment