Merge pull request #2229 from sveltejs/repl-app-named-exports

repl: deal with named module exports from main App
pull/2231/head
Rich Harris 7 years ago committed by GitHub
commit 9d01503923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -76,7 +76,7 @@
window.location.hash = ''; window.location.hash = '';
window._svelteTransitionManager = null; window._svelteTransitionManager = null;
window.component = new SvelteComponent({ window.component = new SvelteComponent.default({
target: document.body target: document.body
}); });
`); `);

@ -174,6 +174,7 @@ async function bundle(components) {
import_map.set(id, name); import_map.set(id, name);
return name; return name;
}, },
exports: 'named',
sourcemap: true sourcemap: true
}); });
@ -197,6 +198,7 @@ async function bundle(components) {
format: 'iife', format: 'iife',
name: 'SvelteComponent', name: 'SvelteComponent',
globals: id => import_map.get(id), globals: id => import_map.get(id),
exports: 'named',
sourcemap: true sourcemap: true
}) })
: null; : null;

Loading…
Cancel
Save