You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

publicPath.js 687B

1234567891011121314
  1. // This sets up the URL prefix used in webpack's chunk loading.
  2. // This file must be imported before any lazy-loading is being attempted.
  3. const { StaticUrlPrefix } = window.config;
  4. if (StaticUrlPrefix) {
  5. __webpack_public_path__ = `${StaticUrlPrefix.endsWith('/') ? StaticUrlPrefix : `${StaticUrlPrefix}/`}js`;
  6. } else if (document.currentScript && document.currentScript.src) {
  7. const url = new URL(document.currentScript.src);
  8. __webpack_public_path__ = `${url.pathname.replace(/\/[^/]*$/, '')}/`;
  9. } else {
  10. // compat: IE11
  11. const script = document.querySelector('script[src*="/index.js"]');
  12. __webpack_public_path__ = `${script.getAttribute('src').replace(/\/[^/]*$/, '')}/`;
  13. }