Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function bundle(lookup) {
let bundle
try {
bundle = await rollup.rollup({
input: './App.svelte',
external: (id: string) => {
if (id[0] === '.') return false;
if (id.endsWith('.svelte')) return false;
if (id.startsWith('svelte')) return true;
return true;
},
plugins: [{
resolveId(importee, importer) {
if (importee in lookup) return importee;
},
load(id) {
if (id in lookup) {
return lookup[id];
}
},