File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
editor/src/lib/compile-worker
repl/src/lib/workers/bundler Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1+ ../node_modules/svelte
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ declare var self: Window & typeof globalThis & { svelte: typeof import('svelte/c
1313let inited : PromiseWithResolvers < typeof self . svelte > ;
1414
1515async function init ( v : string ) {
16- const svelte_url = `https://unpkg.com/svelte@${ v } ` ;
16+ const svelte_url = v === 'local' ? '/svelte' : `https://unpkg.com/svelte@${ v } ` ;
1717 const match = / ^ (?: p r | c o m m i t ) - ( .+ ) / . exec ( v ) ;
1818
1919 let tarball : FileDescription [ ] | undefined ;
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ async function init(v: string, packages_url: string) {
5656 const url = `${ svelte_url } /${ file . name . slice ( 'package/' . length ) } ` ;
5757 FETCH_CACHE . set ( url , Promise . resolve ( { url, body : file . text } ) ) ;
5858 }
59+ } else if ( v === 'local' ) {
60+ version = v ;
61+ svelte_url = `/svelte` ;
5962 } else {
6063 const response = await fetch ( `${ packages_url } /svelte@${ v } /package.json` ) ;
6164 const pkg = await response . json ( ) ;
You can’t perform that action at this time.
0 commit comments