···11-import {joinPaths} from './utils.js';
22-31// DO NOT IMPORT window.config HERE!
42// to make sure the error handler always works, we should never import `window.config`, because some user's custom template breaks it.
5364// This sets up the URL prefix used in webpack's chunk loading.
75// This file must be imported before any lazy-loading is being attempted.
88-__webpack_public_path__ = joinPaths(window?.config?.assetUrlPrefix ?? '/', '/');
66+__webpack_public_path__ = `${window.config?.assetUrlPrefix ?? '/assets'}/`;
97108export function showGlobalErrorMessage(msg) {
119 const pageContent = document.querySelector('.page-content');
-10
web_src/js/utils.js
···1111 return ext || '';
1212}
13131414-// join a list of path segments with slashes, ensuring no double slashes
1515-export function joinPaths(...parts) {
1616- let str = '';
1717- for (const part of parts) {
1818- if (!part) continue;
1919- str = !str ? part : `${str.replace(/\/$/, '')}/${part.replace(/^\//, '')}`;
2020- }
2121- return str;
2222-}
2323-2414// test whether a variable is an object
2515export function isObject(obj) {
2616 return Object.prototype.toString.call(obj) === '[object Object]';