|
|
@ -260,6 +260,9 @@ async function get_bundle(uid, mode, cache, local_files_lookup) {
|
|
|
|
name: 'svelte-repl',
|
|
|
|
name: 'svelte-repl',
|
|
|
|
async resolveId(importee, importer) {
|
|
|
|
async resolveId(importee, importer) {
|
|
|
|
if (uid !== current_id) throw ABORT;
|
|
|
|
if (uid !== current_id) throw ABORT;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (importee === 'esm-env') return importee;
|
|
|
|
|
|
|
|
|
|
|
|
const v5 = is_v5();
|
|
|
|
const v5 = is_v5();
|
|
|
|
const v4 = !v5 && is_v4();
|
|
|
|
const v4 = !v5 && is_v4();
|
|
|
|
|
|
|
|
|
|
|
@ -358,6 +361,10 @@ async function get_bundle(uid, mode, cache, local_files_lookup) {
|
|
|
|
async load(resolved) {
|
|
|
|
async load(resolved) {
|
|
|
|
if (uid !== current_id) throw ABORT;
|
|
|
|
if (uid !== current_id) throw ABORT;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (resolved === 'esm-env') {
|
|
|
|
|
|
|
|
return `export const BROWSER = true; export const DEV = true`;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const cached_file = local_files_lookup.get(resolved);
|
|
|
|
const cached_file = local_files_lookup.get(resolved);
|
|
|
|
if (cached_file) return cached_file.source;
|
|
|
|
if (cached_file) return cached_file.source;
|
|
|
|
|
|
|
|
|
|
|
|