Skip to content

Commit

Permalink
frontendAssetsFullURL doesn't work locally
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakeii committed Dec 3, 2024
1 parent 0af9fd5 commit 413915b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/commercial.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { getConsentFor, onConsent } from '@guardian/libs';
import { commercialFeatures } from './lib/commercial-features';

const { frontendAssetsFullURL, page } = window.guardian.config;
const { page } = window.guardian.config;

const decideAssetsPath = () => {
if (process.env.OVERRIDE_BUNDLE_PATH) {
return process.env.OVERRIDE_BUNDLE_PATH;
}
const assetsPath = frontendAssetsFullURL ?? page.assetsPath;
// TEMP
// Adjust the path we use to fetch dynamic imports to match the
// bucket key we use to deploy via Riff-Raff
return `${assetsPath}test_commercial_bundles/`;
return `${page.assetsPath}test_commercial_bundles/`;
};

__webpack_public_path__ = decideAssetsPath();
Expand Down

0 comments on commit 413915b

Please sign in to comment.