-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy pathpublic-path.js
More file actions
22 lines (19 loc) · 931 Bytes
/
public-path.js
File metadata and controls
22 lines (19 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
* Copyright (c) 2024, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
/**
* This file is used to dynamically set the webpack public path used by HMR via the global webpack variable
* __webpack_public_path__
* See https://webpack.js.org/guides/public-path/
*
* Previously, we hard coded the public path in our webpack config to '/mobify/bundle/development/'
* but we need something more dynamic to support namespaced /mobify paths.
*/
import {bundleBasePath} from '@salesforce/pwa-kit-runtime/utils/ssr-namespace-paths'
/* global __webpack_public_path__: writable */
// This global variable is used by webpack for HMR (Hot Module Replacement)
// eslint-disable-next-line @typescript-eslint/no-unused-vars
__webpack_public_path__ = `${bundleBasePath}/development/`