Skip to content

Commit 3add646

Browse files
committed
Use jsdelivr for resolviing dependency files
UNPKG has some CORS header issues right now, we fix it by using jsdelivr in the meantime. Fixes codesandbox#1507
1 parent ee37ed4 commit 3add646

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/app/src/sandbox/eval/npm/fetch-npm-module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const ALIAS_REGEX = /\/\d*\.\d*\.\d*.*?(\/|$)/;
7676
function getUnpkgUrl(name: string, version: string) {
7777
const nameWithoutAlias = name.replace(ALIAS_REGEX, '');
7878

79-
return TEMP_USE_JSDELIVR
79+
return true // TODO: change to TEMP_USE_JSDELIVR
8080
? `https://cdn.jsdelivr.net/npm/${nameWithoutAlias}@${version}`
8181
: `https://unpkg.com/${nameWithoutAlias}@${version}`;
8282
}

0 commit comments

Comments
 (0)