Skip to content

Commit 28fcd8c

Browse files
author
Ives van Hoorne
committed
Add new packager to bundler request
1 parent 0a7a931 commit 28fcd8c

File tree

1 file changed

+10
-0
lines changed
  • src/app/store/entities/sandboxes/bundler

1 file changed

+10
-0
lines changed

src/app/store/entities/sandboxes/bundler/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import logError from '../../../../utils/error';
1010
const debug = _debug('cs:app:packager');
1111

1212
export const PACKAGER_URL = 'https://cdn.jsdelivr.net/webpack/v5';
13+
export const NEW_PACKAGER_URL = 'https://cdn.jsdelivr.net/webpack/v6';
1314

1415
const RETRY_COUNT = 10;
1516

@@ -20,6 +21,15 @@ const RETRY_COUNT = 10;
2021
* @param {string} query The dependencies to call
2122
*/
2223
async function requestPackager(query: string) {
24+
try {
25+
// Call the new packager at the same time, so we can build up a cache
26+
// before completely moving over
27+
const url = `${NEW_PACKAGER_URL}/${query}`;
28+
callApi(`${url}/manifest.json`);
29+
} catch (e) {
30+
logError(e);
31+
}
32+
2333
let retries = 0;
2434

2535
while (true) {

0 commit comments

Comments
 (0)